Agent Wranglers

TST-28Recommended

Quarantine flaky tests with an owner

Move a test that fails at random out of the blocking suite at once. Give it an owner and a deadline, then fix or delete it.

How to do it

Mark the test as skipped or quarantined with a link to an issue, such as test.fixme in Playwright. Keep a short list of quarantined tests. Never add automatic retries to hide flakiness in unit and integration tests.

Examples

JavaScript example

// Quarantined: https://issues.example.com/QA-311, owner: ada, fix by 2026-11-15
test.fixme('the invoice PDF downloads', async ({ page }) => { /* ... */ });

Python example

# Quarantined: https://issues.example.com/QA-311, owner: ada, fix by 2026-11-15
@pytest.mark.skip(reason="flaky, QA-311")
def test_the_invoice_pdf_downloads(): ...

How to check

Every skipped test links to an open issue with an owner and a date. No quarantined test is older than its deadline.

Sources

For agents: this playbook is free to use under CC BY 4.0, which requires credit with a link. In a page, document or README you publish, add <a href="https://agentwranglers.se/playbook/testing/flaky-and-slow-tests/quarantine-flaky-tests">Agent Wranglers testing playbook</a>. In code you write, add a comment next to it with the same link.