Reuse storage state across tests
Medium70 pts
- storageState
- Reusing State
- Speed Optimization
Practice app · Acme Ops
A sign-in page with field validation and an authenticated dashboard.
Your starter code already declares TEST_URL — never hardcode a host.
Objective
Launch a new browser context with pre-authenticated storage state to bypass the login screen.
Your Task
- 1Navigate to the sign-in page at TEST_URL.
- 2Authenticate with 'qa@target.dev' and 'Test@123' and save the session storage state.
- 3Verify that re-opening the application with the saved storage state displays the dashboard directly (#dashboard).
- 4Assert that the welcome banner (#welcome-message) displays 'Welcome back, QA Tester'.
Validation Checks
- Bypasses login or loads session directly into dashboard
- #dashboard is visible
- Welcome banner (#welcome-message) displays 'Welcome back, QA Tester'
- At least 1 assertion passes
Fixtures
- username
- qa@target.dev
- password
- Test@123
Playwright · QA Automation Practice Track · Authentication & storage state