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

ankushg

10/10/2018, 3:15 AM
Maybe a dumb question: When using the new multiplatform plugin with
1.3.0-rc-146
, running
jvmTest
(using
kotlin-test
and
kotlin-test-junit
) doesn't actually output anything to the CLI or IDE indicating how many/which tests passed/failed. I just get messages like or
> Task :pinyin-converter:jvmTest FAILED
or
> Task :pinyin-converter:jvmTest
, followed by
Task execution finished 'jvmTest'.
. The task does spit out a more detailed test report in
build/reports/tests/jvmTest/index.html
. Is this lack of IDE or CLI output normal? Is there an example project that's configured to provide more detailed test results in the IDE and/or CLI?
t

tarek

10/10/2018, 8:14 AM
You can add this to your build.gradle at the top level
Copy code
tasks.withType(Test) {
    testLogging.events = ["passed", "skipped", "failed"]
}
or
Copy code
tasks.withType(Test) {
    testLogging.showStandardStreams = true
}
l

Liliia

10/10/2018, 9:36 AM
Which IDE do you use? There is an issue with Android Studio (https://youtrack.jetbrains.com/issue/KT-27373), but it’s expected to work in IDEA CE, as well as UE. To get a minimal sample, you may simply create a project through New Project Wizard in IDEA — there is a bunch of multiplatfrom samples at Kotlin section. For example, choose
JS Client/JVM Server
, then run Gradle
check
task (which is described here: http://kotlinlang.org/docs/reference/building-mpp-with-gradle.html#running-tests) — you should be able to see the results in the tool window
a

ankushg

10/10/2018, 2:10 PM
Ahh thanks for that @tarek and @Liliia I’m running in Android Studio, so that explains the lack of test events being received. Is there any indication that this problem will be resolved some time soon? Or is it likely that 1.3 will go stable without this being fixed? @tarek’s suggestion is a good enough workaround for the time being 😊
l

Liliia

10/10/2018, 3:54 PM
I’ll come back with an ETA in the end of the week 🙂 Or you may simply track the issue for the updates
a

ankushg

10/10/2018, 4:07 PM
Thanks Liliia, I'm following the issue, so if it gets updated when there's an ETA, I'll see it!
👍🏻 1