# Real-time code coverage: watching a test run while it happens

> Coverage reports usually arrive after the suite is done, which is when a missing agent or an untraced service is most expensive to find. Here is what CoverOps shows while a run is still going: a live trace feed, a live mark per service, test counts as they change, and every replica that is reporting.

Published 2026-11-18 · Updated 2026-11-18 · Melih Sakarya
Canonical: https://coverops.ai/blog/real-time-code-coverage

Short answer: real-time code coverage means seeing what a test run reaches while it is still running, not after the report is written. In CoverOps, a running run's page streams each request hop as the agents report it, marks every service that sent a trace frame in the last 10 seconds as live, updates the passed, failed and skipped counts as they change, and reloads its coverage figures every 10 seconds. The Agents screen lists every replica that is reporting, refreshed every 5 seconds. The steps arrive within seconds; the coverage percentages move as each agent uploads, which is every 30 seconds by default.

## Why waiting for the report is expensive

A distributed functional suite can run for an hour against a dozen services. If one of them was started without its agent, or with tracing off, or with the wrong run key, a report written at the end tells you after the hour is gone. The same goes for a test that silently stopped reaching a service because a client was swapped for one that does not carry the test context. The useful moment to see these things is the first minute.

Real-time coverage answers three questions while there is still time to act:

- Is everything reporting? Every service the tests should reach shows up, live, with the right version and environment.

- Is the traffic going where I expect? The steps arriving name the services and methods the tests are actually running.

- How is the run going? Passes, failures and tests still waiting for a verdict, as they happen.

## The live trace feed

While a run is running, its detail page shows a live trace feed. Each entry is one request hop: the service it ran in, how many methods it ran, up to three of them as Class.method() with up to six line numbers and a duration, and "… +N methods" for the rest. Above the steps, a status line shows the run's status and the passed, failed and skipped counts as they change, plus the number of tests that have coverage but no verdict yet.

A badge says what the feed is doing: connecting, live, paused, closed or error. Pause live feed stops this browser reading the stream while the run keeps collecting; Resume reconnects and catches up on what was reported in the meantime. The feed polls about every 1.2 seconds and reconnects with back-off, up to 30 seconds, when the connection drops. The server closes every stream after 10 minutes; while the run is running and the feed is not paused, the page reconnects without a warning and carries on from where it stopped.

Until the first step arrives, the panel lists what has to be true for steps to appear, which doubles as a setup checklist:

- the agent runs with COVERAGEOPS_TRACE=true;

- the process was restarted after that;

- an inbound HTTP request reaches the service (timers and queue jobs are not traced).

## A live mark per service

Below the headline numbers, the run page has one card per application: shard name, agent, environment when the run has more than one, N pods when the service reported from more than one replica, the agent's version and language, and line, branch and function coverage. A card shows live and a green mark when its service sent a trace frame in the last 10 seconds; the mark fades 10 seconds after the last frame.

That makes a quiet service easy to spot. If the checkout tests are running and the payment card has no live mark, either the tests are not reaching payment, or payment is not tracing. Click the card to filter the page to that application.

## How fast the numbers move

It helps to know which part is instant and which is not.

- Steps appear in the feed as agents report them; the feed polls about every 1.2 seconds.

- Coverage figures come from the agents' uploads. An agent sends its running total every flush cycle, 30 seconds by default for the Java and Node.js agents, minimum 5. While the run is running, the page reloads every 10 seconds.

- The flush interval can be changed for every agent of the project from Server-side agent settings on the Agents screen (5 to 3,600 seconds). Agents apply it on their next poll, without a restart.

- The run list on Coverage monitoring reloads every 5 seconds. An open monitoring window shows its line coverage, or "waiting for the first report" until the first upload arrives.

A shorter flush interval makes the percentages move sooner. Steps do not depend on it.

## The fleet behind the run

The Agents screen's live fleet lists every replica reporting into the project, one row per pod or host: status, service and pod, language, environment, IP, version and last report. A replica is up when it reported within the last 90 seconds, otherwise idle, and the list refreshes every 5 seconds. Grouping by service, environment or language shows at a glance whether, say, all five pods of the order service are up before the suite starts.

## A first-minute routine

- Before the suite starts, open Agents and check that every service the tests need is up, in the right environment, on the expected version.

- Start the suite. The runner opens the run before its first test; open it from Coverage monitoring, where it is listed under Still collecting.

- Watch the live trace feed. The first steps should name the services your first tests call.

- Check the application cards. Every service the tests reach should show live. One that never does is your first thing to look at.

- Leave the page. The run keeps collecting whether or not anyone is watching; pause the feed if you only want the counts.

## Manual testing, live too

A monitoring window started from Coverage monitoring is a run like any other, so while it is open its page has the same live trace feed and live marks. A tester clicking through the application can watch the steps their session causes arrive, service by service, and can name a scenario on a navigation with the ?covtest= query parameter, so the work that navigation causes is filed under that name.

## Limits to know

- The feed shows traced work. An agent without tracing still reports coverage, but sends no steps.

- Timers and queue jobs that do not continue a request's context are not traced, so they never appear as steps.

- With sampling on, a request that was not sampled still appears as a hop, without its methods.

- Coverage percentages are as fresh as the last upload, not the last request.

- The page loads at most 5,000 call frames for a run; the test popup asks for its own frames separately.

- When the run has finished, the feed says nothing is streaming; the run page then shows the final figures.

This is one part of the functional test coverage in distributed systems series. For the fleet in depth, see monitoring coverage agents across replicas. The run detail guide and the agents guide describe every panel, and the deployed test coverage page has the product summary.
