Skip to content
This repository has been archived by the owner on Aug 5, 2021. It is now read-only.

Starting single test in Android Studio 2.3 requires full rebuild #90

Open
smdremedy opened this issue Jun 26, 2017 · 18 comments
Open

Starting single test in Android Studio 2.3 requires full rebuild #90

smdremedy opened this issue Jun 26, 2017 · 18 comments

Comments

@smdremedy
Copy link

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.

@svtk
Copy link
Contributor

svtk commented Jul 10, 2017

Please vote and subscribe to this issue: https://youtrack.jetbrains.com/issue/KT-18948.

@liangfenxiaodao
Copy link

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.

@khalodark
Copy link

@jackylimel Have you found solution for this issue? I am still facing it now

@liangfenxiaodao
Copy link

not yet, I'm running the koans with Intellij Idea now

@afaktor
Copy link

afaktor commented Nov 21, 2017

I ran into the same problem after loading kotlin-koans into Android Studio 3.0. No solution found yet.

1 similar comment
@MahatmaSun
Copy link

I ran into the same problem after loading kotlin-koans into Android Studio 3.0. No solution found yet.

@tsunhua
Copy link

tsunhua commented Dec 8, 2017

See my case here:https://stackoverflow.com/a/47706652/5671221

@lisongting
Copy link

I ran into the same problem after loading kotlin-koans into Android Studio 3.0.1. No solution found yet.

@KevCron
Copy link

KevCron commented Jan 24, 2018

I ran into the same problem after loading kotlin-koans into Android Studio 3.0.1. as well. No solution found either.

@elrondliu
Copy link

I found a solution in Android Studio 3.0.1, open Gradle panel, Tasks -> build -> testClasses.
Wait complete, and run test

@lisongting
Copy link

lisongting commented Jan 30, 2018

I found a method to solve this problem.

2018-01-30_224732

After several seconds, then you will see something like this.
2018-01-30_224801

Click the left green button of every test class , then you can see whether your code is right or not.
2018-01-30_225330

@bstrathearn
Copy link

bstrathearn commented Feb 2, 2018

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.

@DanielNovak
Copy link

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.

@jimandreas
Copy link

jimandreas commented May 5, 2018

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

@LDuncAndroid
Copy link

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.

image

@lawloretienne
Copy link

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.

@lawloretienne
Copy link

Looks like this is still an issue nearly a year later.
https://youtrack.jetbrains.com/issue/KT-18948

@Dorrro
Copy link

Dorrro commented Jul 9, 2018

I've ended up using https://kotlinlang.org/docs/tutorials/edu-tools-learner.html
At least it works out of the box.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests