Reputation: 60184
I'm using decard-gradle to run my junit tests in Android Studio.
It's all fine if you run tests from terminal, i.e. ./gradlew clean test
, but if you want to debug during your tests execution you need to run them from IDE (Android Studio in my case).
In order to debug you need to add a new Gradle configuration in your Run/Debug Configurations - clean test
- and if you want the only one test class to execute then you create a JUnit configuration where you put 'launch another configuration' and specify gradle conf you created in prev step.
Sometimes I can see a list of tests within my test class with results, sometimes - not. I experimented a lot but didn't find a way how to make them always show. That's not really about debbuging only, this also applies to simple test run - sometimes you can see a list of tests, sometimes - not.
Configuration: Android Studio 0.8.14 gradle-2.1 'com.android.tools.build:gradle:0.13.2'
Upvotes: 0
Views: 837
Reputation: 7438
When i understood correct, then you like to run single tests in Android Studio. I can tell you different ways:
Upvotes: 1