https://kotlinlang.org logo
s

Sabrina Namur

02/19/2021, 8:30 AM
Hey, is it possible to generate common tests dynamically (with a for loop)? I'm using the kmm plugin and have only andorid and ios as targets. I tried to set up junit5 and use TestFactory Annotations but it does not work.
b

Benoît

02/19/2021, 11:07 AM
Did you include the Kotlin test dependencies in your commonTest? (in build.gradle)
s

Sabrina Namur

02/19/2021, 11:24 AM
I tried this: (in my shared module in the build.gradle.kts file)
Copy code
implementation(kotlin("test-common"))
implementation(kotlin("test-annotations-common"))
implementation(kotlin("test-junit5"))
I found another solution that works for me. So thanks for the help, but this fits for me.
4 Views