Automate a smoke test of your Android app
When to use: You want 'app opens, login, main screen loads' as an auto-run before every release.
Prerequisites
- ADB installed and device connected — Android Studio ships ADB;
adb devicesshould show your device - Device has USB debugging or wireless debugging on — Settings > Developer Options > USB Debugging
Flow
-
Capture current stateGet the UI state — what screen am I on and what elements are visible?✓ Copied→ UI tree with labeled elements
-
Execute the flowTap the 'Sign In' button, type '[email protected]' in the email field, 'P@ss' in password, submit.✓ Copied→ App transitions to home
-
Assert successVerify the home screen's 'Welcome' banner is visible. If not, fail.✓ Copied→ Pass/fail verdict
Outcome: A scriptable smoke test you can run on every build.
Pitfalls
- Coordinates change between device sizes — Prefer State-Tool queries that find elements by label/id, then click the returned coordinates
- Flow breaks on A/B tests — Pin build config or disable experiments for QA builds