Chapter 52: Reports, retries and flaky tests
Automation learning lab
Playwright Automation
Self Study Guide
Start from zero. Learn JavaScript and TypeScript, automate browsers, and build reliable end-to-end tests.
Reports, retries and flaky tests
Reporters summarize outcomes and artifacts. A test that fails initially and passes on retry is classified as flaky by Playwright. Retries are useful diagnostics but should not hide root causes. A configured HTML reporter can display test details.
How it works
Step-by-step walkthrough
- Configure an HTML reporter
- Run tests with retries
- Open the report
Example
npx playwright test --reporter=html --retries=1
npx playwright show-reportInvestigate flaky tests rather than simply increasing retries.
Screenshot walkthrough

✎ Your practice task
Find the error message and duration of a failed test.
Knowledge check
What is a test that fails first and passes on retry called?
🌐 Continue learning
60-chapter learning path
Start at chapter 1, or choose any topic. Your progress is tracked separately for each chapter.
JavaScript fundamentals
TypeScript fundamentals
Playwright • setup & locators
Playwright • interactions & assertions
Playwright • framework & debugging
Playwright • real-world automation
Interactive practice lab
Try the controls below and observe the corresponding Playwright locator instructions. This browser demo does not execute Node.js or Playwright Test; copy the code to your local Playwright project to automate it.
Task manager demo
Suggested automation
Actions on the demo update these examples. In your local test use a page that contains the same controls.
Download a standalone lab page, then serve it locally (for example with Python's http.server). Navigate to it in a Playwright test.