-
Notifications
You must be signed in to change notification settings - Fork 564
[Feature Request] Test name prefix argument for test runner #2708
Comments
Thank you for the request. Such a request is already filed at YouTrack (https://youtrack.jetbrains.com/issue/KT-25057) and we are going to implement it in the near future. Closing this issue as a duplicate of the YouTrack one. As a workaround you can pass the prefix using project properties (Kotlin DSL): kotlin {
// Replace with the platform you use.
linuxX64("linux") {
binaries.getExecutable("test", DEBUG).runTask?.apply {
project.findProperty("testFilter")?.let {
setArgs(listOf("--ktest_filter=$it"))
}
}
}
} After that you can pass the prefix using the
|
@ilmat192 thanks for the reply! I think I might not have explained this clearly. What I'd like is, in the test report that's logged, to have each test class prepended with some string. For example, if you had a test class called |
I see, thank you for the clarification. I think this may make sense not only for native but also for other platforms. We'll discuss this point. |
According to migrating issue tracking to YouTrack, closing this issue in favour of KT-43365. The use case with different platforms is already supported by the Gradle plugin out of the box (see the YouTrack issue). But there are other possible cases when this feature can be useful, so I think that it's better to keep this feature request open and just move it to YouTrack. |
We want to run the unit tests once per platform we support. In a CI environment, to separate test failures of one platform from another, we could prefix the names of the test suites with the platform name that we're running the tests on. One way to accomplish this would be allow passing a flag like
--ktest_suite_prefix=<platform>
.Thanks!
The text was updated successfully, but these errors were encountered: