Suppose an Android search screen keeps its query when you rotate the phone. The selected item stays highlighted, the results remain visible, and the test passes. Later, you leave the app, Android removes its background process, and returning to the same task opens an empty screen.
The rotation test was useful. It just exercised a different lifetime.
Activity recreation, process death, and task removal are separate experiments. Treating all three as “restart the app” makes a green restoration test difficult to interpret. A stronger test records what was destroyed, how the app was resumed, and which state should survive that particular transition.
The search screen and package name below are illustrative. This is a test recipe for a single-process debug build, with expected outcomes rather than device measurements.
Start with the lifetime, not the gesture
An Activity is one component of an app. A process contains its in-memory objects. A task holds a navigation stack.…