8

I have some Espresso tests which are in the androidTest directory of Android Studio. When I bring cursor over the green triangle (see below) to run the test the Studio shows "Run Test" instead of "Run verifySomething" and proceeds to run the test as a unit test instead of Espresso test. This was working fine until I upgraded from Studio 3.4 to 3.5 although I cannot tell fo sure this is the root cause. If I go to Run | Edit Configurations I can see that Studio added a new entry "Android JUnit" in the left side panel instead of "Android Instrumented Test". If I manually create "Android Instrumented Test" configuration and manually add the "verifySomething" method I can run it as Instrumented test if I select it from the Studio's top level menu bar configuration dropdown. How can I restore previous behavior where Studio automatically recognizes and uses instrumented test methods?

enter image description here

Community
  • 1
  • 1
alexbtr
  • 3,292
  • 2
  • 13
  • 25

1 Answers1

0

I faced the same issue on version 3.5.2. After updating Android Studio to 3.5.3 it is starting instrumentation tests as usual, when clicking on the green rectangle next to the test function.

KraffMann
  • 322
  • 1
  • 4
  • 14