I’m in the process of migrating some tests from Sp...
# kotest
j
I’m in the process of migrating some tests from Spek to Kotest, and I’m running into a problem where gradle won’t execute my kotest specs when I have include the spek test engine. Has anyone ran into this before? Right now it seems I can either execute either spek or kotest but not both.
s
if you have both engines on the classpath, the gradle should run both. What's the error ?
j
> ./gradlew clean test --tests exampleSpec
No tests found for ….
when I run
gradle test
it executes all of the junit5 tests and spek tests but not any of the kotests
s
and if you remove spek then
gradle test
runs the junit and kotest tests ?
j
yep
s
so I wonder if spek is interfering with kotest somehow
j
seems to be that way - was curious if anyone had seen this before
s
I know some people have ran both spek and kotest tests together, when they, like you, are doing a migration.
what does your test config look like in gradle
j
Copy code
test {
    useJUnitPlatform() {
        includeEngines 'spek', 'junit-vintage', 'junit-jupiter'
    }
}
s
Try
Copy code
test {
    useJUnitPlatform() {
        includeEngines 'spek', 'junit-vintage', 'junit-jupiter', 'kotest'
    }
}
j
didn’t realize kotest was an option - one sec
s
I think if you don't include any, it will run them all
but if you have includeEngines then it will only run those enignes
j
wow - that solved it
thanks!
s
cool