hello-kotlin-multiplatform icon indicating copy to clipboard operation
hello-kotlin-multiplatform copied to clipboard

No test classes are found for common and js projects on 'gradle test'

Open wadejensen opened this issue 6 years ago • 3 comments

Tests fail to run in hello_lib_common and hello_js_browser_app. JVM project tests seem to run correctly.

gradle test --info
...
> Task :hello_lib_common:testClasses UP-TO-DATE
Skipping task ':hello_lib_common:testClasses' as it has no actions.
:hello_lib_common:testClasses (Thread[Task worker for ':',5,main]) completed. Took 0.0 secs.
:hello_lib_common:test (Thread[Task worker for ':',5,main]) started.
...
> Task :hello_lib_jvm:testClasses UP-TO-DATE
Skipping task ':hello_lib_jvm:testClasses' as it has no actions.
:hello_lib_jvm:testClasses (Thread[Daemon worker Thread 9,5,main]) completed. Took 0.0 secs.
:hello_lib_jvm:test (Thread[Daemon worker Thread 9,5,main]) started.

Apologies for not showing this more convincingly, or succinctly, but gradle limits my options since it does not print out test results. (Or I don't know how to configure it to in a nice way).

image

image

image

wadejensen avatar Sep 03 '18 21:09 wadejensen

Yes, I know about it. I'll try to use a newer tooling, maybe this was already fixed.

wojta avatar Sep 04 '18 07:09 wojta

I've had a look around and this project seems to work for JS. https://github.com/jstuyts/kotlin-multiplatform-recipes

I'll let you know how it goes.

wadejensen avatar Sep 04 '18 08:09 wadejensen

I got the above mentioned style of testing working with Qunit for a project containing a common-js, backend-js, and frontend-js module.

I also realised that it is non-sensical for tests to run in the common platform module, as there is no defined runtime.

wadejensen avatar Sep 05 '18 11:09 wadejensen

It should be now working as expected with the latest Kotlin Multiplatform support. Tests running as a whole, now I have the results in the CircleCI also. https://app.circleci.com/pipelines/github/wojta/hello-kotlin-multiplatform/42/workflows/971fc480-50c3-42a6-aaf6-e1aa4b2e34f8/jobs/52/artifacts

wojta avatar Oct 28 '22 12:10 wojta