Kotlin / kotlin-koans

Kotlin workshop
MIT License
2.6k stars 1.41k forks source link

Gradle test task doesn't work for Android Studio/InteliJ #142

Open vol24pl opened 6 years ago

vol24pl commented 6 years ago

Hello. I'm not able to run test task.

STR:

  1. clone git
  2. open in Android Studio (3.0.1) / InteliJ
  3. View -> Tool Windows -> Gradle
  4. Click "Execute Gradle Task" icon
  5. write "test" as parameter and accept

Optionally I clicked "build" icon before step 3. It didn't change anything.

After running it shows:

:compileKotlin UP-TO-DATE :compileJava UP-TO-DATE :processResources NO-SOURCE :classes UP-TO-DATE :compileTestKotlin UP-TO-DATE :compileTestJava NO-SOURCE :processTestResources NO-SOURCE :testClasses UP-TO-DATE :test

and event log shows 21:58 Tests Passed: 0 passed

(It's the same for master and resolution branches)

When i use console with ./gradlew test i have the good results 93 tests completed, 90 failed

When I right click on test and click Run 'N00StartKitTest' from contextual menu, it works as well 22:06 Tests Failed: 0 passed, 1 failed or 22:08 Tests Passed: 1 passed

vol24pl commented 6 years ago

EDIT:

• InteliJ + "Import Projects" works well I think problem accurs when you choose to "Open project" instead of "Import". Same on the Android Studio