Add retry logic for flaky tests
Hard120 pts~45 min
- Flaky tests
- Retries
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
Add a bounded, logged retry mechanism so transient failures are retried without hiding real defects.
Your task
- 1Add retries with your framework (JUnit Pioneer @RetryingTest, TestNG IRetryAnalyzer, pytest-rerunfailures, NUnit [Retry], Mocha this.retries) or a bounded attempt loop.
- 2Allow at most 3 attempts and log every retry with its reason.
- 3Sign in with qa@target.dev / Test@123 (#username, #password, #login-button).
- 4Assert the welcome message on the dashboard.
Acceptance criteria
- A bounded retry mechanism is present
- The dashboard is shown
- At least 1 assertion passes
Constraints
- Cap retries at 3 attempts and never retry assertion failures silently.
Fixtures
- username
- qa@target.dev
- password
- Test@123
Selenium WebDriver 4 · Selenium · Grid, parallel & CI