https://kotlinlang.org logo
#test
Title
# test
l

Lou Morda

09/17/2019, 10:48 PM
Is there a way to run one individual test in a class of lots of tests with IntelliJ? Trying to run one unit test with the run button from sidebar, I think we used to be able to do this...
1
m

Mike

09/18/2019, 12:18 AM
Use the run icon beside a test method. That should do it.
a

arekolek

09/18/2019, 6:50 AM
If your project uses Spek as well, you might have lost that functionality even for JUnit tests
l

Lou Morda

09/18/2019, 4:08 PM
The run icon beside the test method still runs only the test method in Java, yes. But in Kotlin the run icon beside the test method runs all of the test methods in the class. I believe this is new because I used to be able to run one Kotlin test method by clicking the run icon next to it... I'm using JUnit5 but I've been using that for awhile now. Wondering if I am doing something wrong?
Okay I was tipped off by another dev that if I right click inside the method, that I can run just that method! Sorry for the clutter. I just found this interesting
i

ianbrandt

09/21/2019, 4:29 PM
I’ve been experiencing this too. I quickly searched for a related YouTrack bug, but didn’t see one. I haven’t had a chance to file one yet.
👍 1
l

Lou Morda

09/23/2019, 5:52 PM
Someone filed it for Android Studio, not sure if it's made it to InelliJ: https://issuetracker.google.com/issues/140787210
3 Views