Koitt Koitt - 3 months ago 608
Android Question

Class not found: Empty test suite when running unit tests in Android Studio

I have a test suite for my Android app, and all unit tests run fine. However, whenever I make a single change in one of my unit test classes (for example,

ModelUnitTests
), when trying to run that class again, I get this message

Process finished with exit code 1
Class not found: "xxx.xxxxxx.xxx.ModelUnitTests"Empty test suite.


If I do a gradle clean and then run the class tests again, it runs fine (but it takes 4 minutes to do...), but then a new change will break it again.

Any advice on how to fix this? I'm not exactly sure which test configuration should I post. I'm using the Unit Tests artifact and my tests are located on the
module/src/test/package
folder

Answer

Solved it using a lower gradle version

dependencies {
    classpath 'com.android.tools.build:gradle:2.0.0'

That will have to do for now

Comments