Appium 2

Reset app state between tests

Medium70 pts~25 min
  • Test isolation
  • App lifecycle
Practice app · Acme Mobile

A mobile app in a device frame. Elements expose data-accessibility-id (= aria-label) for AppiumBy.accessibilityId.

Test URL
/lab/appium-reset-app-state-between-tests

Your starter code already declares TEST_URL — never hardcode a host.

Objective

Prove your test leaves no state behind: log in, reset the app, and land on a fresh login screen.

Your task

  1. 1Log in as qa@target.dev / Test@123 via the accessibility ids "username", "password" and "login".
  2. 2Assert the inbox is displayed.
  3. 3Reset the app: terminateApp + activateApp, or set noReset=false / fullReset in capabilities for the next session, or log out from Profile (accessibility id "logout").
  4. 4Assert the login screen is shown again and the inbox is gone.

Acceptance criteria

  • The inbox is shown after login
  • After the reset the login screen is shown
  • At least 2 assertions pass

Fixtures

username
qa@target.dev
password
Test@123

Appium 2 · Appium · Setup & capabilities