Reading a Test Report Like an SRE, With Agents in the Loop
Most teams read a test report the way they read a status page: green means ship, red means block. An SRE reads the same report the way they read a service dashboard, looking for rate, trend and blast radius rather than current state. Runtime variance, retry inflation and the same handful of test IDs that keep resurfacing carry far more signal than the pass/fail headline.
That habit matters more in agentic quality engineering. Coding agents now add and edit tests faster than anyone reviews them, so the suite's trustworthiness can drift without a single red build. Suites also increasingly contain tests that call a model or drive an agent, and those are expected to vary from run to run. A report that only answers "did it pass?" cannot tell a real regression from an agent-introduced flake or from normal model variance.
This article gives you the SRE mental model for reading any test report, a SQL query for a results store, a Grafana panel that puts runtime drift next to deploy markers, and a section on reading results for model-calling tests as pass rates against a budget instead of as binary outcomes.
Learn Node.js, Cucumber, GitHub Copilot, APIs, CI/CD, and modern automation by building a complete framework.
What an SRE Actually Looks for in a Test Report
An SRE's first instinct is to ask: what is the error budget cost of this suite? That reframes the report from a quality artifact into a reliability signal. Every flaky test is an alert that fires randomly. Every slow test is latency injected into your deployment pipeline. Every skipped test is a coverage gap that distorts every rate you report upward. None of that shows up in a headline pass percentage.
The four metrics that matter under this model are: flake rate (retried-then-passed / total runs), P95 runtime per test and per suite, failure recurrence (how many failing tests appeared in the last N runs), and skip delta (change in skipped count between runs). These map directly to SRE concerns — noise, latency, reliability, and coverage integrity. A report that doesn't surface all four is hiding information.
Wiring the Report into a Signal Pipeline
Start at the source. JUnit XML is the lingua franca — Pytest, Playwright, and every JVM framework emit it. Parse it into a structured store. ClickHouse or BigQuery work well at scale; PostgreSQL is fine for most teams until query times say otherwise. The schema that matters is: run_id, test_id, suite, status, duration_ms, retry_count, timestamp. Once you have that, you can ask real questions.
-- Flake rate by test, last 30 days (PostgreSQL)
SELECT
test_id,
COUNT(*) AS total_runs,
SUM(CASE WHEN retry_count > 0 AND status = 'passed' THEN 1 ELSE 0 END) AS flaky_passes,
ROUND(
100.0 * SUM(CASE WHEN retry_count > 0 AND status = 'passed' THEN 1 ELSE 0 END)
/ NULLIF(COUNT(*), 0), 2
) AS flake_rate_pct,
PERCENTILE_CONT(0.95) WITHIN GROUP (ORDER BY duration_ms) AS p95_ms
FROM test_results
WHERE timestamp >= NOW() - INTERVAL '30 days'
GROUP BY test_id
HAVING 100.0 * SUM(CASE WHEN retry_count > 0 AND status = 'passed' THEN 1 ELSE 0 END) / COUNT(*) > 2.0
ORDER BY flake_rate_pct DESC
LIMIT 50;
That query returns the tests burning your retry budget. Feed it into a Grafana table panel with a threshold at 5% flake rate and you have a flaky-test leaderboard that updates with every CI run. Retry cost is usually concentrated in a small set of tests, a distribution that's invisible in headline pass rates. For a deeper look at how flake rate compounds across dependent pipeline stages, the math gets worse than most expect.
For runtime drift, a Grafana panel backed by the same table gives you a deployment-correlated view:
// Grafana panel JSON snippet — P95 runtime over time, annotated with deploys
{
"type": "timeseries",
"title": "Suite P95 Runtime (ms) vs Deploys",
"targets": [
{
"rawSql": "SELECT DATE_TRUNC('hour', timestamp) AS time, PERCENTILE_CONT(0.95) WITHIN GROUP (ORDER BY duration_ms) AS p95 FROM test_results WHERE suite = '$suite' GROUP BY 1 ORDER BY 1",
"format": "time_series"
}
],
"fieldConfig": {
"defaults": { "unit": "ms", "thresholds": { "steps": [{"color": "green", "value": 0}, {"color": "red", "value": 30000}] } }
}
}
Overlay your deployment annotations from GitHub Actions or Argo Workflows and runtime spikes become attributable. Correlating suite P95 drift with deployment logs is often how infrastructure causes, such as a new grid node with a misconfigured timeout, get found when the pass/fail view shows nothing. For teams on GitHub Actions specifically, improving test report output from your pipelines is the prerequisite step before any of this warehousing is possible.
Where Engineers Misread the Data Under Pressure
The most common mistake is treating aggregate pass rate as a suite health signal. A suite that runs 2,000 tests and passes 1,980 looks like 99% — but if those 20 failures are the same 5 tests failing 4 times each due to retries, you have a flake problem, not a coverage problem. Aggregate rate obscures recurrence. Always segment by test_id before drawing conclusions. This is also where suite composition skews the metrics you report — adding low-value tests to a suite inflates the denominator and flatters the rate.
The second mistake is ignoring skip delta. Teams add @pytest.mark.skip or xit() under deadline pressure and never revisit. The skip count grows silently, pass rate holds steady, and the coverage assumption baked into your release gate is wrong. A simple alert on skip_count_today > skip_count_7d_avg * 1.1 catches this before it compounds. Neither Allure nor ReportPortal surfaces this by default — you have to build it.
Reading Agent-Written and Model-Calling Tests Like an SRE
The SRE question "what is the error budget cost of this suite?" extends naturally to agentic systems. Two additions make the report readable again.
First, record where each test came from. If an agent opened the pull request that added or last changed a test, store that as a column (for example origin = 'agent', taken from the PR author or a commit trailer). Then segment flake rate and skip delta by origin. If agent-authored tests flake more, or skips arrive in agent PRs, you have a review-gate problem, not a test problem, and the fix belongs in your repository instructions for agents and in human review.
Second, stop reading model-calling tests as pass/fail. A test that asks a model to summarise a document is a sample from a distribution. Run it N times, report the pass rate, and compare it against an agreed threshold, the same way an SLO compares success ratio against a target:
-- Model-calling tests: pass rate per test over the last 7 days vs. a 90% budget
SELECT
test_id,
COUNT(*) AS samples,
ROUND(100.0 * AVG(CASE WHEN status = 'passed' THEN 1 ELSE 0 END), 1) AS pass_rate_pct
FROM test_results
WHERE kind = 'model'
AND timestamp >= NOW() - INTERVAL '7 days'
GROUP BY test_id
HAVING AVG(CASE WHEN status = 'passed' THEN 1 ELSE 0 END) < 0.90
ORDER BY pass_rate_pct;
Keep these rows out of the flake-rate panel. A model test that passes 92% of the time is healthy against a 90% budget; the same number on a deterministic API test means something is broken. Mixing them hides both. When an agent triages failures for you, judge it on the same report: its classifications should be spot-checked, and "retry until green" should never count as a fix.
Myths That Survive Even in Mature Engineering Orgs
Myth 1: A green suite means the system is healthy. Passing tests confirm the behaviors you thought to test, under the conditions you chose to test them. They say nothing about what you didn't cover or what's drifting in production right now. This is precisely why passing synthetic tests can report healthy SLOs during active incidents — the test model and the failure mode don't overlap. Green is a necessary condition for shipping, not a sufficient one.
Myth 2: Dashboards solve the reading problem. A dashboard makes signal visible; it doesn't make it legible. Teams build Grafana boards with 14 panels, none of them actionable, and call it observability. The SRE discipline is to ask: what decision does this panel change? If the answer is "none," the panel is decoration. Flake rate, P95 runtime drift, failure recurrence, and skip delta — those four panels change decisions. Pass percentage, test count, and suite duration in isolation generally don't. Build fewer panels with sharper thresholds and on-call routing, not more.
Reading a test report like an SRE means treating it as a reliability signal, not a correctness certificate. Instrument your JUnit XML output into a queryable store, track flake rate and P95 runtime alongside your deployment markers, and alert on skip delta before it silently hollows out your coverage. If you're starting from scratch on what a well-structured report should contain before you build the analytics layer, the anatomy of a useful test report is the right foundation to read first.
Note: This article is for informational purposes only and is not a substitute for professional advice. If you need guidance on specific situations described in this article, consider consulting a qualified professional.