https://kotlinlang.org logo
#kotest
Title
# kotest
q

q1875486458

03/24/2024, 9:55 AM
how to debug why kotest not even run in kmp?
Copy code
package cong.kdb.db.debug

import io.kotest.core.spec.style.FunSpec
import kotlin.test.Test


class TestA {
    @Test
    fun TestA() {
        println("im A")
    }
}

class TestB : FunSpec({
    test("testB") {
        println("im B")
    }
})
run via
./gradlew linuxX64Test -i --rerun-tasks --tests 'cong.kdb.db.debug.*'
it seems only run TestA but not TestB
Copy code
Task :app:linuxX64Test
Caching disabled for task ':app:linuxX64Test' because:
  Build cache is disabled
Task ':app:linuxX64Test' is not up-to-date because:
  Executed with '--rerun-tasks'.
Watching 82 directories to track changes
Watching 79 directories to track changes
Starting process 'command '/home/cong/sm/project/demo/kotlin/db/app/build/bin/linuxX64/debugTest/test.kexe''. Working directory: /home/cong/sm/project/demo/kotlin/db/app Command: /home/cong/sm/project/demo/kotlin/db/app/build/bin/linuxX64/debugTest/test.kexe --ktest_no_exit_code --ktest_logger=TEAMCITY --ktest_gradle_filter=cong.kdb.db.debug.*
Successfully started process 'command '/home/cong/sm/project/demo/kotlin/db/app/build/bin/linuxX64/debugTest/test.kexe''

cong.kdb.db.debug.TestA.TestA[linuxX64] STANDARD_OUT
    im A
Finished generating test XML results (0.0 secs) into: /home/cong/sm/project/demo/kotlin/db/app/build/test-results/linuxX64Test
Generating HTML test report...
Finished generating test html results (0.096 secs) into: /home/cong/sm/project/demo/kotlin/db/app/build/reports/tests/linuxX64Test
Watching 80 directories to track changes
Watching 85 directories to track changes
Watching 86 directories to track changes
3 Views