JaLoveAst1k
JaLoveAst1k

Reputation: 511

Run Kotlin Koans tests from Android Studio

Windows 10, Android Studio 3.0.
So I just cloned Kotlin Koans repo from master branch and tried to run tests in two different ways:
1. Using IDE, when I press the green arrow next to the test method I see:

Process finished with exit code 1
Class not found: "i_introduction._0_Hello_World.N00StartKtTest"Empty test suite.

2. And when I try to use terminal as described in Kotlin Koans Readme:

gradlew test --tests i_*

it gives me an output of:

:compileKotlin                                                                   
Using kotlin incremental compilation
Caught an exception trying to connect to Kotlin Daemon
java.lang.ClassNotFoundException: com.sun.tools.javac.util.Context

I've seen a lot of suggestions that there might be tools.jar missing in jdk folder, I am using internal Android Studios jdk and it's presented here. I also tried to disable gradle deamons - result is still the same.

Upvotes: 4

Views: 1153

Answers (2)

Guillodacosta
Guillodacosta

Reputation: 403

you must use the icon "check task" (is the check green icon in photo attachment) on "Task Description" for tests your implementations. enter image description here

Upvotes: 0

Grzegorz D.
Grzegorz D.

Reputation: 1806

If the GitHub version is not working for you, you can also install Kotlin Koans via IntelliJ plugin.

Check out the instruction here: https://kotlinlang.org/docs/tutorials/edu-tools-learner.html

Upvotes: 1

Related Questions