https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
p

pardom

06/25/2019, 1:07 AM
I have all my tests in
commonTest
. Is it possible to choose just one target to run the tests?
b

basher

06/25/2019, 1:16 AM
You could mark the test tasks you don't want to run as enabled = false
p

pardom

06/25/2019, 1:17 AM
Ah, true.
Thanks
b

basher

06/25/2019, 1:17 AM
No prob!
r

russhwolf

06/25/2019, 3:05 AM
You can also do something like
@OptionalExpectation expect annotation class SinglePlatformTest
and then for the platform you’re interested do
actual annotation class SinglePlatformTest = kotlin.Test
. Then annotate tests with
@SinglePlatformTest
if you want them to only run on that platform. This pattern can give you pretty fine-grained control over which tests run on which platforms.
🙌 2
2 Views