Start and end a session
Easy30 pts~12 min
- Sessions
- Test lifecycle
Practice app · Acme Mobile
A mobile app in a device frame. Elements expose data-accessibility-id (= aria-label) for AppiumBy.accessibilityId.
Your starter code already declares TEST_URL — never hardcode a host.
Objective
Own the session lifecycle: start it, prove it is alive, and always end it.
Your task
- 1Let the setup create the session from the starter capabilities.
- 2Assert the session id is not null / empty.
- 3Assert the login button (accessibility id "login") is displayed.
- 4End the session in teardown (quit / deleteSession) even when the test fails.
Acceptance criteria
- The session id is read and asserted
- The login screen is shown
- At least 2 assertions pass
Fixtures
- username
- qa@target.dev
- password
- Test@123
Appium 2 · Appium · Setup & capabilities