3

For two months or so now I haven't been able to run individual UI tests in Android Studio. Right clicking on the test name and then run <test name> just give me the error No tests were found. If I right click on the class name and then click run <testing class name>, it successfully runs all the tests in the class. So in order to just run an individual test in a class I have to resort to commenting out all the tests I don't want to run and then clicking on run from the class name which is a pain. This used to work fine a couple of months ago.

I really don't have much more information to go off of. The only output is

Connected to the target VM, address: '127.0.0.1:49178', transport: 'socket'
Disconnected from the target VM, address: '127.0.0.1:49178', transport: 'socket'

Process finished with exit code 1
Class not found: "com.mypackagename.android.TestClassName"
odiggity
  • 1,496
  • 16
  • 29

1 Answers1

0

Even years later (August 2022), same issue with latest Android Studio IDE;

In my experience, Android Studio 3.x was still able to run individual tests (no matter if individual-test-method or individual-test-class).

I will try updating Gradle, and report back if that helps ;-)

Update; No, the issue does not seem Gradle related.

(I tried both downgrade and update of Gradle, but the issue remains, and only downgrading Android-Studio to v3.x fixes the issue for me.)

Top-Master
  • 7,611
  • 5
  • 39
  • 71