Solution for Test running failed: Unable to find instrumentation info for: ComponentInfo{…./}

Whilst using Espresso I have come across an issue a number of times and each time it takes me a few minutes to remember what the solution is. So, I thought I should put it down here!


Ensure that both your build.gradle in the app folder and the run configuration in Android Studio need to declare the

In the build.gradle file in your app folder you need to add the line

testInstrumentationRunner “”

In your android studio run configuration you will need to add to the Specific Instrumentation Test Runner field.


The is a requirement when using Espresso and although the error message (Unable to find instrumentation info for: ComponentInfo{…./}) is highlighting that the Activity might not have instrumentation set you’ll actually find that it is when you run the command 

 adb shell pm list instrumentation

I am using Android Studio for my development and therefore a lot of the solutions out there talk about modifying the test folders AndroidManifest.xml file. When using Android Studio and the Gradle build system this isn’t needed because the test AndroidManifest.xml is auto generated. As long as you specify the new Google Instrumented Test Runner in both of these locations the problem should resolve itself.