package com.kousenit.helloworld;

import android.test.ActivityInstrumentationTestCase2;

import com.robotium.solo.Solo;

public class MainActivityRobotiumTest
    extends ActivityInstrumentationTestCase2<MainActivity> {

    private Solo solo;

    public MainActivityRobotiumTest() {
        super(MainActivity.class);
    }

    public void setUp() throws Exception {
        super.setUp();
        solo = new Solo(getInstrumentation(), getActivity());
    }

    public void testMyActivity() {
        solo.assertCurrentActivity("MainActivity", MainActivity.class);
    }

    public void testSayHello() {
        solo.enterText(0, "Dolly");
        solo.clickOnButton(getActivity().getString(R.string.hello_button_label));
        solo.assertCurrentActivity("WelcomeActivity", WelcomeActivity.class);
        solo.searchText("Hello, Dolly!");
    }

    public void tearDown() throws Exception {
        super.tearDown();
        solo.finishOpenedActivities();
    }

}

@@ -906,34 +906,8 @@
    s
-uper.tearDown();%0A        s
 olo.
@@ -928,16 +928,42 @@
 tivities
+();%0A        super.tearDown
 ();%0A    

Move call to super in tearDown after Robotium finished opened activities