Skip to content Skip to sidebar Skip to footer

Robotium Test Cannot Find Activity Class

I have been using robotium to test my android application. I found it very useful tool so far. Recently we have done a refactoring that would use only one activity in the entire ap

Solution 1:

Make sureafter refactoring:

The AndroidManifest.xml of the test project is still accurate:

<instrumentationandroid:targetPackage="package.of.the.app.under.test">

The Test class is still accurate:

publicclassYourTestextendsActivityInstrumentationTestCase2<SplashScreenActivity> {
    protectedstaticfinalStringTARGET_PACKAGE_ID="package.of.the.app.under.test";

    protected Solo solo;
    publicTest() {
        super(TARGET_PACKAGE_ID, StartingActivityOfYourAppUnderTest.class);
    }
    //..
} 

All libraries of the app under test can only (!) be found in libs/yourlibrary.jar and are referenced in Project->Properties->Java Build Path->Libraries

Post a Comment for "Robotium Test Cannot Find Activity Class"