Dmytro Serdiuk
02/10/2024, 11:06 PMkotlin-test-common – assertions for use in common code;
kotlin-test-annotations-common – test annotations for use in common code;
kotlin-test – a JVM implementation of assertions from kotlin-test-common;
kotlin-test-junit – provides an implementation of Asserter on top of JUnit and maps the test annotations from kotlin-test-annotations-common to JUnit test annotations;
kotlin-test-junit5 – provides an implementation of Asserter on top of JUnit 5 and maps the test annotations from kotlin-test-annotations-common to JUnit 5 test annotations;
kotlin-test-testng – provides an implementation of Asserter on top of TestNG and maps the test annotations from kotlin-test-annotations-common to TestNG test annotations;
For example I don’t want to use default JUnit for testing, so I saw there is kotlin.test.infer.jvm.variant=false that could be used automatic selection.
So as I understand, kotlin-test.jar for JVM would be used for testing.
But in this case I’m not able to use @Test annotation for test functions and couldn’t import kotlin-test-annotations-common for JVM target, and kotlin.test.Test is still not visible for me.
Could somebody explain me the structure of the kotlin.test library and how to use @Test annotation from common-test-annnotation?
ThanksVampire
02/11/2024, 11:34 AM