teoincontatto / android-test-kit

Automatically exported from code.google.com/p/android-test-kit
0 stars 0 forks source link

Unable to run espresso tests - ComponentInfo not found for android.support.test.runner.AndroidJUnitRunner #145

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. depend on --
    androidTestCompile 'com.android.support.test:runner:0.2'
    androidTestCompile 'com.android.support.test.espresso:espresso-core:2.0'
2. add gradle android plugin config --
    android {
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    ...
    }
3. In Android Studio, Add a run configuration for Android Test with test runner 
"android.support.test.runner.AndroidJUnitRunner" and set project module.

What is the expected output? What do you see instead?

I expected tests to run but instead I am getting an error message: 
Running tests
Test running startedTest running failed: Unable to find instrumentation info 
for: 
ComponentInfo{com.netflix.nts.samurai.mediaclient.test/android.support.test.runn
er.AndroidJUnitRunner}
Empty test suite.

What version of the product are you using? On what operating system?
Android Studio 1.1.0 on Mac OS 10.10.3
Java version "1.8.0_05" 64-Bit Server VM
Target SDK 22

Please provide any additional information below.
This issue started happening since I changed to espresso-core:2.1 and now 
happens even when I changed my dependency version back to espresso-core:2.0. I 
have tried ./gradle clean but still doesn't help.

Original issue reported on code.google.com by mshu...@netflix.com on 24 Apr 2015 at 7:13

GoogleCodeExporter commented 9 years ago

Original comment by nkors...@google.com on 5 May 2015 at 5:32

GoogleCodeExporter commented 9 years ago
Hi there,

It's not the first time I see this problem after changing dependencies and it 
usually only happens from Android Studio. It looks like a problem with the 
Gradle plugin but it's hard to reproduce.

First, change back to espresso-core:2.1 and execute 
./gradlew clean connectedCheck 

from command line.

Original comment by jalc@google.com on 6 May 2015 at 10:54