Closed GoogleCodeExporter closed 9 years ago
Change:
this.solo = new Solo(getInstrumentation(),activity);
to:
this.solo = new Solo(getInstrumentation(),getActivity());
Original comment by renasr...@gmail.com
on 31 Aug 2011 at 5:59
Thanks you.
I try work with this.solo=new Solo(getInstrumentation(),getActivity());
But I also encounter this problem.
Original comment by tranhong...@gmail.com
on 1 Sep 2011 at 1:37
I try to change codes below:
package com.cieaura.test;
import com.jayway.android.robotium.solo.Solo;
import android.test.ActivityInstrumentationTestCase2;
import com.cieaura.R;
import android.widget.EditText;
import android.widget.LinearLayout;
@SuppressWarnings ("unchecked")
public class TestLogin extends ActivityInstrumentationTestCase2{
private static final String TARGET_PACKAGE_ID = "com.cieaura";
private static final String LAUNCHER_ACTIVITY_FULL_CLASSNAME = "com.cieaura.virtualoffice.activity.VOLogin";
private Solo solo;
private LinearLayout llTopBar;
//private VOLogin voLogin;
//private String resourceString;
private static Class<?>launcherActivityClass;
static {
try {
launcherActivityClass=Class.forName(LAUNCHER_ACTIVITY_FULL_CLASSNAME);
}
catch(ClassNotFoundException e)
{
throw new RuntimeException(e);
}
}
@SuppressWarnings("unchecked")
public TestLogin() throws ClassNotFoundException {
super(TARGET_PACKAGE_ID,launcherActivityClass);
}
@Override
protected void setUp() throws Exception {
super.setUp();
this.solo = new Solo(getInstrumentation(),getActivity());
//resourceString=voLogin.getString(com.cieaura.R.id.et_vo_login_username);
System.out.println("There are" + this.countTestCases() + "test cases");
}
@Override
protected void tearDown() throws Exception {
try {
solo.finalize();
} catch (Throwable e) {
e.printStackTrace();
}
getActivity().finish();
super.tearDown();
}
public void testAdd()
{
String user123="abc";
String pass123="1234";
llTopBar=(LinearLayout)solo.getTopParent(getActivity().findViewById(R.id.layout_top_bar));
EditText user=(EditText)solo.getTopParent(getActivity().findViewById(R.id.et_vo_login_username));
solo.enterText(user, user123);
EditText pass=(EditText)solo.getTopParent(getActivity().findViewById(R.id.et_vo_login_password));
solo.enterText(pass, pass123);
solo.clickOnButton(R.id.btn_vo_login_signin);
}
}
and issues that I have in LogCat:
Test failed to run to completion. Reason: 'Instrumentation run failed due to
'java.lang.NullPointerException''. Check device logcat for details
09-01 11:12:05.897: WARN/dalvikvm(456): threadid=1: thread exiting with
uncaught exception (group=0x4001d800)
09-01 11:12:05.927: ERROR/AndroidRuntime(456): FATAL EXCEPTION: main
09-01 11:12:05.927: ERROR/AndroidRuntime(456): java.lang.RuntimeException:
Unable to start activity
ComponentInfo{com.cieaura/com.cieaura.virtualoffice.activity.VOLogin}:
java.lang.NullPointerException
09-01 11:12:05.927: ERROR/AndroidRuntime(456): at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663)
09-01 11:12:05.927: ERROR/AndroidRuntime(456): at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
09-01 11:12:05.927: ERROR/AndroidRuntime(456): at
android.app.ActivityThread.access$2300(ActivityThread.java:125)
09-01 11:12:05.927: ERROR/AndroidRuntime(456): at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
09-01 11:12:05.927: ERROR/AndroidRuntime(456): at
android.os.Handler.dispatchMessage(Handler.java:99)
09-01 11:12:05.927: ERROR/AndroidRuntime(456): at
android.os.Looper.loop(Looper.java:123)
09-01 11:12:05.927: ERROR/AndroidRuntime(456): at
android.app.ActivityThread.main(ActivityThread.java:4627)
09-01 11:12:05.927: ERROR/AndroidRuntime(456): at
java.lang.reflect.Method.invokeNative(Native Method)
09-01 11:12:05.927: ERROR/AndroidRuntime(456): at
java.lang.reflect.Method.invoke(Method.java:521)
09-01 11:12:05.927: ERROR/AndroidRuntime(456): at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
09-01 11:12:05.927: ERROR/AndroidRuntime(456): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
09-01 11:12:05.927: ERROR/AndroidRuntime(456): at
dalvik.system.NativeStart.main(Native Method)
09-01 11:12:05.927: ERROR/AndroidRuntime(456): Caused by:
java.lang.NullPointerException
09-01 11:12:05.927: ERROR/AndroidRuntime(456): at
com.cieaura.virtualoffice.activity.VOLogin.onCreate(VOLogin.java:46)
09-01 11:12:05.927: ERROR/AndroidRuntime(456): at
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
09-01 11:12:05.927: ERROR/AndroidRuntime(456): at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
09-01 11:12:05.927: ERROR/AndroidRuntime(456): ... 11 more
09-01 11:12:05.947: WARN/ActivityManager(69): Error in app com.cieaura running
instrumentation
ComponentInfo{com.cieaura.test/android.test.InstrumentationTestRunner}:
09-01 11:12:05.947: WARN/ActivityManager(69): java.lang.NullPointerException
09-01 11:12:05.947: WARN/ActivityManager(69): java.lang.NullPointerException:
Unable to start activity
ComponentInfo{com.cieaura/com.cieaura.virtualoffice.activity.VOLogin}:
java.lang.NullPointerException
Original comment by tranhong...@gmail.com
on 1 Sep 2011 at 4:47
.i am facing "Instrumentation run failed due to
'java.lang.NullPointerException'",
I am using default android junittest framwork.
in my case I am starting service class from activity...if I put some delay to
start service then it's working..but if it's start without any delay then it's
giving erroe...any suggestion here?
Original comment by shubhamP...@gmail.com
on 19 Oct 2012 at 6:33
05-28 17:22:51 I/0640000200000001:
android.graphics2.cts.TextureViewTest#testTextureViewActivity FAIL
Test failed to run to completion. Reason: 'Instrumentation run failed due to
'java.lang.NullPointerException''. Check device logcat for details
05-28 17:22:53 I/0640000200000001: Saved log
device_logcat_1675676680895097570.zip
05-28 17:22:53 I/0640000200000001: Saved log host_log_6178921336026032335.zip
05-28 17:22:53 I/0640000200000001: android.graphics2 package complete: Passed
0, Failed 1, Not Executed 0
How to fix it??
Regards
Mukesh
Original comment by mukesh...@pathpartnertech.com
on 28 May 2013 at 12:04
Hi
GUI is not coming on the blaze Tablet ,i am using android 4.0.3 and kernel
version 3.0.8.Once i touch the screen to bring the GUI it get restart.I tried
several times,how to resolve it.Is there any driver problem ?.How to fix this?
Thanks in Advance !!!
Regards
Mukesh
Original comment by mukesh...@pathpartnertech.com
on 28 May 2013 at 12:19
Original issue reported on code.google.com by
tranhong...@gmail.com
on 30 Aug 2011 at 10:51