Not able to run Espresso test case
Closed this issue · 3 comments
Hi Jared,
I tried running test case to understand Espresso but came across below 2 issues , please review and clarify.
Issue 1:
./gradlew connectedAndroidTest
Got below error
AndroidGradleTemplate/app/all-libraries/src/androidTest/java/burrows/apps/example/template/instrumentation/MainActivityTest.java:20: warning: [deprecation] ActivityInstrumentationTestCase2(String,Class) in ActivityInstrumentationTestCase2 has been deprecated
super("burrows.apps.example.template", MainActivity.class);
^
where T is a type-variable:
T extends Activity declared in class ActivityInstrumentationTestCase2
error: warnings found and -Werror specified
1 error
1 warning
:app:all-libraries:compileDebugAndroidTestJavaWithJavac FAILED
Issue 2:
Right click an instrumentation test located in src/main/androidTest and click test
This path is wrong , README needs updation
Thanks & Regards,
Vikram
@vikramvi Thanks for pointing this out!
- I have the gradle build setup to fail on decprecations. I have fixed this.
- I do not undestand about the path being wrong?
src/main/androidTest
is the correct path for all ui/instrumentation tests.
I also have not added any Espresso tests, only the support to run them.
Thanks Jared for looking into this issue.
Regards,
Vikram
@vikramvi Anytime!