public class LauncherActivityTest extends ActivityInstrumentationTestCase2 <Launcher> {
private activation Launcher;
public LauncherActivityTest() { super("com.android.launcher.Launcher", Launcher.class); } @Override protected void setUp() throws Exception { super.setUp(); setActivityInitialTouchMode(true); } public void testLauncherApplication() { mActivity = getActivity(); assertTrue(mActivity != null); }
}
add .... manifest.xml
<uses-library android: name = "android.test.runner" / ">
<android toolkit: targetPackage = "com.launcher.launcher" android: name = "android.test.InstrumentationTestRunner" / ">
I am trying to run the original Launcher JUnit test.
Why does the getActivity () function not return?
My phone only works with Launcher. but another application works and then runs the test.
ex) launch a phone application -> test: returning success
launch start only: wait state
Do you know, why? Help me please.
source share