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

Popular posts from this blog

php - SPIP: From Tag directly to an article -

jquery - isAjaxRequest always return false -

ruby on rails - In a controller spec, how to find a specific tag in the generated view? -