TOPIC 29/6016 MINNOT STARTED

Retries and flaky tests

Use Playwright retries to learn which tests are flaky and to gather evidence, without letting them hide the problem or become the cure.

L1–L4 are part of the Pro pass

L0 Explain simply

Analogy: re-reading a smudged number before deciding it is wrong. A shop bill has a smudge. You read a total that looks too high. You do not shout at once. You look again, and now you read it right. The first reading was the problem, not the bill.

Daily List is a to-do list app. Tom's test for the reminder time fails on Monday. On Tuesday it passes, and nothing in the code changed. Nobody knows what to believe.

The picture has limits. Re-reading a number costs nothing. A retry costs time. If you re-read every time, you may never notice that the smudge is real.

What it is: Playwright is a free library from Microsoft that drives a real browser from code. This topic is one slice of that library: what happens after a test fails. A is an automatic second run, set with retries: 2 or --retries=2. A means the test failed first and passed on a retry. The retry count is testInfo.retry. The first run is 0. The first retry is 1. The nearest neighbour is expect(locator).toBeVisible(), which keeps checking inside one run. A test retry starts the whole test again, in a new worker.

Why it matters: A trains the team to ignore failures. Mei starts treating red as noise, and a real bug hides in the noise. Retries with a clear flaky group help her separate a race from a broken page. They are evidence. They are not the cure. A page that fails one time in three is still broken for Lily.

(SYNTHETIC / TRAINING ONLY: Daily List, the site daily-list.example and every person named in this lesson are invented.)

PLAIN WORDS · 6 in this section
smudged
rubbed so that it is hard to read
smudge
a small dirty mark
retry
trying the same action again after it failed
playwright
a free Microsoft tool that drives a browser for tests
flaky
passing sometimes and failing sometimes with no product change
retries
tries again after a failure, or those further attempts

PICTURE IT

The picture is the one the lesson above opens with. The table below shows how each part of it matches the software.

THE REAL JOB Looking again at a result that looks wrong, to learn if the result or the reading was at fault, without ignoring a real fault.

  1. Fail the first time
  2. Retry
  3. Mark it flaky
  4. Find the cause
Read again, then find the smudge

HOW THE PICTURE MAPS

How each part of the picture matches the software
In the pictureIn the software
The smudged numberA failed first attempt
Reading it againA test retry
It reads fine this timeA flaky result
Asking why it smudgedFinding the cause

WHERE THIS PICTURE STOPS

  • Re-reading a number costs nothing. A retry costs time.
  • A smudge is outside the bill. A flake can be in the page.
  • If only the eventual pass is reported, repeated attempts can hide an intermittent error; retain the failed attempt and flaky result.

HOOK

Read again, then find the smudge.

REMEMBER IT THIS WAY

A rule of thumb: if you see this, think that.

If a test passes on a retry, usually treat it as a flaky warning, not a win. Find the smudge before you trust the green.

What each part of the trick stands for
In the trickWhat it stands for
retryrun the failed test again
flakypassed and failed on the same code

A flake can be a real bug in the page, so a retry can hide it.

TELL A FRIEND

A smudged number on a bill. You read it again, and then you ask why it smudged.

OFTEN MIXED UP WITH Flaky tests. The flaky tests lesson explains what a is. This lesson shows what Playwright does about one.

Sources & standards — 6 sources
  1. Market practice

    Retries (Playwright documentation) ↗ — Microsoft · retries re-run a failed test; results are passed, flaky or failed; testInfo.retry is 0 on the first run; retries are off by default (search excerpt, page not opened)

    Describes the retries setting and --retries option, the passed, flaky and failed result categories, testInfo.retry, per-group retries and the guidance on traces with retries. Vendor documentation for one tool. · Checked 2026-10-18

    Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.

  2. Market practice

    Flaky tests at Google and how we mitigate them (Google Testing Blog, 2016) ↗ — Google (Testing Blog) · Flaky tests at Google and how they are managed: a flaky test passes and fails on the same code (search excerpt, page not opened)

    Per the search excerpt, flaky results wear down trust because people learn to ignore alarms with a history of false signals; Google can re-run failing tests and mark a test as flaky. Practitioner guidance, not a standard. · Checked 2026-10-18

    Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.

  3. Market practice

    Auto-waiting (Playwright documentation) ↗ — Microsoft (Playwright) · Reviewed 6 November 2026: Complete extracted primary article; examples inspected, not executed. See v45 source analysis for version scope and documented source ambiguities; no upstream run claimed.

    Says Playwright runs actionability checks (visible, stable, enabled, receives events) before an action and fails with a timeout error if they do not pass in time. Vendor documentation. Practitioner or vendor guidance, not a standard unless stated. · Checked 2026-11-06

    Primary source opened and operative text inspected on 6 November 2026. Scope: Complete extracted primary article; examples inspected, not executed. Current live Playwright documentation reflects 1.65 where stated; explicit older examples retain their version. Source inspection is not an execution or compatibility-test claim. See the completed v45 Playwright analysis for source discrepancies and exact reading boundaries.

  4. Market practice

    ISTQB Certified Tester Foundation Level Syllabus v4.0.1 ↗ — International Software Testing Qualifications Board · Section 6.2, Benefits and Risks of Test Automation: a tool needs ongoing effort to give lasting benefits, and its risks need analysis and mitigation (confirmed against the syllabus, read in full text from a mirror copy of the publisher PDF, v4.0.1, 15 September 2024)

    The examinable statement of what a foundation-level tester is expected to know: six chapters, 64 learning objectives, each tagged K1 Remember, K2 Understand or K3 Apply, plus the test-design techniques the qualification names and groups as black-box, white-box and experience-based.

    Used here for the test-craft questions a Payment Quality Assurance Analyst and a Production Support Analyst are asked. It is cited for what the syllabus says a tester must be able to do, never as a rule about how payments work. · Checked 2026-11-07

    v4.0.1 is dated 15 September 2024 and is a list of corrections to v4.0 (21 April 2023) that reworded six learning objectives — not a cosmetic reissue. 78 pages.

    Two traps this entry exists to stop. v4.0.2 is the German edition (1 March 2025, 94 pages), so sorting by version number reaches the wrong document. And the widely-repeated per-chapter question allocation "8 / 5 / 4 / 11 / 9 / 3" is wrong: it is 8 / 6 / 4 / 11 / 9 / 2, derived from three official sample-exam answer keys and confirmed against the Exam Structure Tables.

    The single most consequential detail for a question bank: white-box coverage — statement and branch — is K2 "Explain", not K3 "Apply" (FL-4.3.1, FL-4.3.2, FL-4.3.3), and MC/DC, path and condition coverage are declared out of scope in §4.3. A question asking a candidate to compute branch coverage is testing something this syllabus does not.

    Read through a mirror, because the publisher's own domain could not be fetched (a reachability gap, not a statement about the publisher). A 403 there is a policy refusal and says nothing about whether the document exists or is reachable elsewhere.

    Anyone on an unrestricted network should open the canonical URL above and confirm the section and page numbers cited against it. Every claim drawn from this entry is written so that it can be checked against a numbered page.

    Read from two independent PDF-to-markdown conversions mirrored on raw.githubusercontent.com. They are treated as faithful because they were produced by unrelated parties with different tooling, agree on the full 64-item objective set including wording, and reproduce the same internal inconsistency present in the source PDF. Chapter 1 reads "testware that supports" where Appendix B reads "that support". A conversion artefact does not replicate across two toolchains.

    The licence permits attributed non-commercial extracts and use as the basis for articles. Whether a site that sells a pass may rely on that is an owner's decision, not this entry's.

    7 November 2026 review: actual publisher PDF 4.0.1, 15 September 2024, 78 pages, front matter/copyright and relevant numbered operative sections 0.5–0.10 and chapters 1–6 compared with CTFLpractice lessons. Earlier mirror/search descriptions are historical access records. TheK2 white-box objectives require explanation; the source does not justify a categorical ban on small numeric illustrations that support explanation. Later Exam Rules 1.2§4.1.4 usesK2 for keyword definitions, while syllabus§0.5 usesK1; keep dated scopes distinct. No copied questions or figure assets.

  5. Market practice

    Retries ↗ — Playwright (Microsoft) · Reviewed 6 November 2026: Complete extracted primary article; examples inspected, not executed. See v45 source analysis for version scope and documented source ambiguities; no upstream run claimed.

    A test that fails and then passes on retry is categorized flaky; the run can be set to fail on flaky tests. · Checked 2026-11-06

    Primary source opened and operative text inspected on 6 November 2026. Scope: Complete extracted primary article; examples inspected, not executed. Current live Playwright documentation reflects 1.65 where stated; explicit older examples retain their version. Source inspection is not an execution or compatibility-test claim. See the completed v45 Playwright analysis for source discrepancies and exact reading boundaries.

  6. Market practice

    TestOptions (Playwright documentation) ↗ — Microsoft (Playwright) · Reviewed 6 November 2026: trace/video attempt retention. See v45 source analysis for version scope and documented source ambiguities; no upstream run claimed.

    Describes connectOptions in the test config. Vendor documentation, not a standard. · Checked 2026-11-06

    Primary source opened and operative text inspected on 6 November 2026. Scope: trace/video attempt retention. Current live Playwright documentation reflects 1.65 where stated; explicit older examples retain their version. Source inspection is not an execution or compatibility-test claim. See the completed v45 Playwright analysis for source discrepancies and exact reading boundaries.

PRACTISE AND KEEP

Sources for this topic — 7 sources
  1. Market practice

    Retries (Playwright documentation) ↗ — Microsoft · retries re-run a failed test; results are passed, flaky or failed; testInfo.retry is 0 on the first run; retries are off by default (search excerpt, page not opened)

    Describes the retries setting and --retries option, the passed, flaky and failed result categories, testInfo.retry, per-group retries and the guidance on traces with retries. Vendor documentation for one tool. · Checked 2026-10-18

    Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.

  2. Market practice

    Flaky tests at Google and how we mitigate them (Google Testing Blog, 2016) ↗ — Google (Testing Blog) · Flaky tests at Google and how they are managed: a flaky test passes and fails on the same code (search excerpt, page not opened)

    Per the search excerpt, flaky results wear down trust because people learn to ignore alarms with a history of false signals; Google can re-run failing tests and mark a test as flaky. Practitioner guidance, not a standard. · Checked 2026-10-18

    Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.

  3. Market practice

    Auto-waiting (Playwright documentation) ↗ — Microsoft (Playwright) · Reviewed 6 November 2026: Complete extracted primary article; examples inspected, not executed. See v45 source analysis for version scope and documented source ambiguities; no upstream run claimed.

    Says Playwright runs actionability checks (visible, stable, enabled, receives events) before an action and fails with a timeout error if they do not pass in time. Vendor documentation. Practitioner or vendor guidance, not a standard unless stated. · Checked 2026-11-06

    Primary source opened and operative text inspected on 6 November 2026. Scope: Complete extracted primary article; examples inspected, not executed. Current live Playwright documentation reflects 1.65 where stated; explicit older examples retain their version. Source inspection is not an execution or compatibility-test claim. See the completed v45 Playwright analysis for source discrepancies and exact reading boundaries.

  4. Market practice

    ISTQB Certified Tester Foundation Level Syllabus v4.0.1 ↗ — International Software Testing Qualifications Board · Section 6.2, Benefits and Risks of Test Automation: a tool needs ongoing effort to give lasting benefits, and its risks need analysis and mitigation (confirmed against the syllabus, read in full text from a mirror copy of the publisher PDF, v4.0.1, 15 September 2024)

    The examinable statement of what a foundation-level tester is expected to know: six chapters, 64 learning objectives, each tagged K1 Remember, K2 Understand or K3 Apply, plus the test-design techniques the qualification names and groups as black-box, white-box and experience-based.

    Used here for the test-craft questions a Payment Quality Assurance Analyst and a Production Support Analyst are asked. It is cited for what the syllabus says a tester must be able to do, never as a rule about how payments work. · Checked 2026-11-07

    v4.0.1 is dated 15 September 2024 and is a list of corrections to v4.0 (21 April 2023) that reworded six learning objectives — not a cosmetic reissue. 78 pages.

    Two traps this entry exists to stop. v4.0.2 is the German edition (1 March 2025, 94 pages), so sorting by version number reaches the wrong document. And the widely-repeated per-chapter question allocation "8 / 5 / 4 / 11 / 9 / 3" is wrong: it is 8 / 6 / 4 / 11 / 9 / 2, derived from three official sample-exam answer keys and confirmed against the Exam Structure Tables.

    The single most consequential detail for a question bank: white-box coverage — statement and branch — is K2 "Explain", not K3 "Apply" (FL-4.3.1, FL-4.3.2, FL-4.3.3), and MC/DC, path and condition coverage are declared out of scope in §4.3. A question asking a candidate to compute branch coverage is testing something this syllabus does not.

    Read through a mirror, because the publisher's own domain could not be fetched (a reachability gap, not a statement about the publisher). A 403 there is a policy refusal and says nothing about whether the document exists or is reachable elsewhere.

    Anyone on an unrestricted network should open the canonical URL above and confirm the section and page numbers cited against it. Every claim drawn from this entry is written so that it can be checked against a numbered page.

    Read from two independent PDF-to-markdown conversions mirrored on raw.githubusercontent.com. They are treated as faithful because they were produced by unrelated parties with different tooling, agree on the full 64-item objective set including wording, and reproduce the same internal inconsistency present in the source PDF. Chapter 1 reads "testware that supports" where Appendix B reads "that support". A conversion artefact does not replicate across two toolchains.

    The licence permits attributed non-commercial extracts and use as the basis for articles. Whether a site that sells a pass may rely on that is an owner's decision, not this entry's.

    7 November 2026 review: actual publisher PDF 4.0.1, 15 September 2024, 78 pages, front matter/copyright and relevant numbered operative sections 0.5–0.10 and chapters 1–6 compared with CTFLpractice lessons. Earlier mirror/search descriptions are historical access records. TheK2 white-box objectives require explanation; the source does not justify a categorical ban on small numeric illustrations that support explanation. Later Exam Rules 1.2§4.1.4 usesK2 for keyword definitions, while syllabus§0.5 usesK1; keep dated scopes distinct. No copied questions or figure assets.

  5. Market practice

    Trace viewer: recording a trace ↗ — Microsoft / Playwright project · on-first-retry records the first retry, not the initial failed attempt or second retry. The --trace on command enables recording for a diagnostic run. (primary page opened and read, 2026-10-21)

    on-first-retry records the first retry, not the initial failed attempt or second retry. The --trace on command enables recording for a diagnostic run. · Checked 2026-10-21

    Primary page opened and read on 2026-10-21. Scope is the claim described here; this does not upgrade earlier citations to other pages. Examples in Daily List are synthetic teaching examples.

  6. Market practice

    Retries ↗ — Playwright (Microsoft) · Reviewed 6 November 2026: Complete extracted primary article; examples inspected, not executed. See v45 source analysis for version scope and documented source ambiguities; no upstream run claimed.

    A test that fails and then passes on retry is categorized flaky; the run can be set to fail on flaky tests. · Checked 2026-11-06

    Primary source opened and operative text inspected on 6 November 2026. Scope: Complete extracted primary article; examples inspected, not executed. Current live Playwright documentation reflects 1.65 where stated; explicit older examples retain their version. Source inspection is not an execution or compatibility-test claim. See the completed v45 Playwright analysis for source discrepancies and exact reading boundaries.

  7. Market practice

    TestOptions (Playwright documentation) ↗ — Microsoft (Playwright) · Reviewed 6 November 2026: trace/video attempt retention. See v45 source analysis for version scope and documented source ambiguities; no upstream run claimed.

    Describes connectOptions in the test config. Vendor documentation, not a standard. · Checked 2026-11-06

    Primary source opened and operative text inspected on 6 November 2026. Scope: trace/video attempt retention. Current live Playwright documentation reflects 1.65 where stated; explicit older examples retain their version. Source inspection is not an execution or compatibility-test claim. See the completed v45 Playwright analysis for source discrepancies and exact reading boundaries.

Deepest material on this page: L4 — Standards & sources. Where a topic stops short of implementation depth, that is a deliberate coverage decision, not an oversight — see coverage.