Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Instrumented tests configuration problem

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

like image 796
alexbtr Avatar asked Jul 04 '26 00:07

alexbtr


1 Answers

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.

like image 189
KraffMann Avatar answered Jul 06 '26 13:07

KraffMann