Sparround

Reporting and metrics

The purpose of a report isn't a pretty picture — it's helping someone make a decision. Different audiences ask different questions:

  • A developer (on a PR): "what did my change break, and why?" → fast, a direct link, trace/screenshot
  • A QA (during triage): "is this a real bug or flaky?" → history, retry status, artifacts
  • A team lead / manager: "is quality improving?" → trends, escaped defects, suite health

Reporters:

  • html — Playwright's built-in report; interactive, links straight into traces. The best for daily work and COMPLETELY SUFFICIENT for most projects
  • list / dot — console output (for reading in CI logs)
  • junit — XML; lets CI systems (Jenkins, GitLab, Azure DevOps) show test results in their own UI
  • blob + merge-reports — for combining results from separate sharded machines into one report; mandatory if you use sharding
  • Allure — a separate ecosystem: history and trends, linking test cases to requirements, steps, attachments, severity. Valuable in large teams and audit-heavy environments; on a small project it's extra infrastructure (hosting, a generation step)

Metrics — the most valuable part of this topic for interviews. The rule: a good metric leads to a decision; a vanity metric only looks good in a report.

Valuable metrics:

  • Escaped defects — bugs reaching production. The single most important metric, because it answers the suite's PRIMARY purpose directly. For each escaped defect, ask: "why didn't our tests catch this?" — the answer yields a new test or a new approach
  • Flaky rate — the percentage of tests passing only on retry. Target <1%; above 5% the team stops believing red and the suite's entire value collapses
  • Suite duration and PR feedback time — how long a developer waits. A PR pipeline longer than 10 minutes breeds a bypass culture
  • Pass rate trend — the TREND matters, not the absolute number
  • Test maintenance cost — how many tests needed fixing per feature change (an indicator of brittle design)

Vanity metrics (handle with care):

  • Test count — 500 weak tests are worse than 50 strong ones, and they cost more to maintain
  • Code coverage % — measures test code's REACH, not its VALUE: an assertion-less test still produces coverage
  • Automation percentage — "80% of test cases are automated" says nothing, because the cases themselves differ wildly in value
  • A 100% pass rate — an always-green suite is suspicious: either the tests are weak or they verify nothing
MetricWhich question it answersWhich decision it drives
Escaped defectsIs the suite doing its primary job?A new test/approach per missed bug; exposing coverage gaps
Flaky rateCan a red result be trusted?Allocating sprint time to flakiness above 1%
PR feedback timeAre tests blocking developer flow?Tiering the suite, sharding, moving work to the API
Test count— (nothing)Nothing; growth is neither good nor bad news
Code coverage %How much of the code gets executed?Useful only for spotting GAPS; harmful when set as a target

A question that always comes up: "how do you measure automation success?" Weak answer: "coverage and test count". Strong answer: "First I ask — for whom, and for which decision, are we measuring?" Then: escaped defects (is the suite working?), flaky rate (can we trust it?), feedback time (is it blocking?). And criticise the vanity metrics yourself — that shows you've thought about the topic rather than memorised it.

📚 Sources and documentation