intellij Idea don't run a JUnit5 test annotated of kotlin annotation + @TestTemplate
Answered
Hello:)
I've created the next annotation for repeating tests:
@Target(AnnotationTarget.CLASS, AnnotationTarget.FUNCTION)
@Retention(AnnotationRetention.RUNTIME)
@ExtendWith(RetryTestExtension::class)
@TestTemplate
annotation class Retry(val value: Int = 1,
val exceptions: Array<KClass<out Throwable>> = [Throwable::class],
val sleep: Long = 0,
val name: String = SHORT_DISPLAY_NAME
)
This annotation contains @TestTemplate. It can run tests in JUnit5.
But when I'm using it on a test, idea isn't showing the button to run a test:
class ExampleRetryTest{
@Retry
fun test1(){
println("test1")
}
}
If I add @TestTemplate I can run a test
class ExampleRetryTest{
@Retry
@TestTemplate
fun test2(){
println("test1")
}
}
You can see:

If I run a test from maven it works without @TestTemplate:)
What Do I need to do that I can run to tests?
what's wrong?;)
Please sign in to leave a comment.
Please file a bug at https://youtrack.jetbrains.com/issues/KT with a simple project (or .kt file) attached.
Done https://youtrack.jetbrains.com/issue/IDEA-224202
Same problem with `@Testable` and own test engine
@...
Feel free to add your details in the reproted bug: https://youtrack.jetbrains.com/issue/KT-34183