https://kotlinlang.org logo
#android
Title
# android
a

adam-mcneilly

11/29/2017, 3:01 AM
Okay, here's one - why is it that when I create an instrumented test in Kotlin, and I try to use the play button in the IDE for that class to run it, it says empty test suite? But if I run
./gradlew cAT
in the terminal, it works fine?
g

gildor

11/29/2017, 3:04 AM
Maybe you created unit tests run configuration for this test class. Try to delete it and press “play button” again, IDE should ask you about type of test
a

adam-mcneilly

11/29/2017, 3:14 AM
Thanks. Unfortunately was unable to do it this way, the IDE seemed to create a unit test configuration each time. Manually creating an integration one is good enough for tonight, I'll look into this more with a clear head tomorrow.
g

gildor

11/29/2017, 3:19 AM
I have this option on AS now, just checked for a new class (Press “Play”, “Run MyTestClass…” and there is submenu with test type chooser). Maybe IDE cannot recognise your instrumentation runner configuration for some reason
🤔 1
r

Ricardo

11/29/2017, 1:14 PM
Having the same problem 😕 clicking on the arrow doesn't work
😞 1
g

gabriel.gutierrez

12/01/2017, 5:15 AM
Did u solve it? ’Im having the same issue 😞
a

adam-mcneilly

12/01/2017, 2:28 PM
I did not. I haven't touched it since though.
g

gabriel.gutierrez

12/01/2017, 5:11 PM
FYI. I just solved it. I was missing the plugin: ‘kotlin-android’ in the build.gradle for the module.
a

adam-mcneilly

12/01/2017, 5:15 PM
Hmm I'm not at my personal laptop but I'll have to check that. The whole module was written in Kotlin so I don't know why tests would be any different.
3 Views