android - Robotium: Launch app from the background -
in robotium test, send app background sending home key code.
solo.sendkey(keyevent.keycode_home); how launch app background?
there launchactivity method don't want specify activity. move app foreground.
thanks.
sadly robotium alone not believe possible. app testing loses focus no longer able instrument against , therefore robotium can no longetr launch application.
if want test things can either use instrumentation methods such callactivityonresume etc, use differnt test framework (the ui automator 1 google not have same restriction) or can find way use adb re laucnh app , allow instrumentation occur. might able create service re laucnh app too. first , second involve fair bit of work sadly.
Comments
Post a Comment