0

As I am not exactly satisfied with Android Studio's new unit test functionality (I know it's a beta, see my questions here and here) I want to go back to how tests worked until the update to 1.1.0. I created a androidTest folder under src, but the IDE doesn't seem to recognize the folder as a test folder or the test class a test. I also can't set up a Run configuration for my test classes as they aren't recognized as tests (see attached screenshot).

Can I go back to how unit tests worked before the 1.1.0 update without downgrading my Android studio?

EDIT: I can set the test root folder. I disabled the 'experimental unit test support' feature in Android Studio, yet when I right click my test class and run, Android Studio still uses the new feature. When I create a Run configuration and run gradlew connectedCheck, AS opens the 'old' unit test view and uploads something to the device, but shows 'empty test suit' even thoough I explicitly select my test class for the Run configuration.

Google messed up my whole development setup with this update, they should at least provide some more info on how to NOT use their experimental feature.

enter image description here

Community
  • 1
  • 1
fweigl
  • 21,278
  • 20
  • 114
  • 205

1 Answers1

0

Try to set test folder manually in your build.gradle file. It should look like this:

android{
    sourceSets{
        test{
            java.srcDirs = ['tests/src']
        }
     }
}

Then try to create build configuration for your test project. Also, this guide can help.

noktigula
  • 425
  • 6
  • 15