Suppose you are constructing a test case for the Android platform using a class with a signature like:
public class AccountTest extends ActivityInstrumentationTestCase2<MainActivity> { ... }
Say we have a test method like this using the Robotium framework:
public void testCreateAccount() {
solo.clickOnButton("Add Account");
solo.clickOnButton("Next");
...
}
When the test case completes, the instrumented activity is swiftly killed. Is there any way to keep it alive upon termination, at least for the purpose of determining what you want to do next and coding the next few lines?
As it turns out, it is easy to accomplish essentially what I want by using the Nativedriver library:
http://code.google.com/p/nativedriver/
Omitting
driver.quit()at the end of the test case keeps the activity alive, which is very handy when developing the test case initially.