Open smdremedy opened 7 years ago
Please vote and subscribe to this issue: https://youtrack.jetbrains.com/issue/KT-18948.
I'm experiencing the same issue, and when I try to run a single unit test in Android Studio 3.0 Preview 2, I got this error:
Class not found: "i_introduction._0_Hello_World.N00StartKtTest"Empty test suite.
@jackylimel Have you found solution for this issue? I am still facing it now
not yet, I'm running the koans with Intellij Idea now
I ran into the same problem after loading kotlin-koans into Android Studio 3.0. No solution found yet.
I ran into the same problem after loading kotlin-koans into Android Studio 3.0. No solution found yet.
See my case here:https://stackoverflow.com/a/47706652/5671221
I ran into the same problem after loading kotlin-koans into Android Studio 3.0.1. No solution found yet.
I ran into the same problem after loading kotlin-koans into Android Studio 3.0.1. as well. No solution found either.
I found a solution in Android Studio 3.0.1, open Gradle panel, Tasks -> build -> testClasses. Wait complete, and run test
I found a method to solve this problem.
After several seconds, then you will see something like this.
Click the left green button of every test class , then you can see whether your code is right or not.
To be clear, once you perform the above :testClasses gradle task, you can right-click on each test file and run individual tests as expected.
The annoying part is that you need to run :testClasses each and every time you modify the kotlin koans and want to see updated results.
That's really a major issue for anyone starting with Kotlin - it really leaves a bad first impression. You clone the Koans tutorial and you are stuck right in the beginning.
See these Android Studio issues. Hopefully this will get fixed soon. For now I am working on the Koans in IntelliJ IDEA (Community Edition) and the experience is awesome. https://issuetracker.google.com/issues/78601041 https://issuetracker.google.com/issues/71694304
If you edit the "Android JUnit" configuration under "Defaults" and add a gradle task to run before launch, you can run the testClasses
task before each of the tests are run.
Every time you make a change to a test you have to rerun the testClasses Gradle task. This is not obvious at all. Please add a disclaimer on the repo about this problem until it's resolved.
Looks like this is still an issue nearly a year later. https://youtrack.jetbrains.com/issue/KT-18948
I've ended up using https://kotlinlang.org/docs/tutorials/edu-tools-learner.html At least it works out of the box.
Now that Kotlin is an official language for Android, can you fix this: https://discuss.kotlinlang.org/t/kotlin-koans/2808
I taught Kotlin last weekend to Android developers, and they had to call
gradlew test
after each change. Installing InteliJ just to do koans is a bit too much.