How it works
From the first agent to a pull request check
Four steps. The first two produce coverage; the last two put it to work in review and CI. A pilot usually starts with one service and one suite.
The steps
- 01
Attach an agent to each service
Register the agent in CoverOps and start the service with it. On Kubernetes, a mutating webhook attaches the Java and Node.js agents to any pod with the
coverageops.io/attachannotation.java -javaagent:coverageops-agent.jar -jar app.jar NODE_OPTIONS="--require @coverageops/node-agent/register" node server.js
- 02
Let each test say who it is
Coverage is attributed to a test through the
X-CoverageOps-Testheader. The Playwright and Cypress plugins and the JUnit 5 extension set it; any other client (Postman, k6, your own) sends it on its requests. For manual testing, start a monitoring run and stop it when the testing ends. - 03
Read coverage and impact
Each run shows coverage per service, file and test. The Impact screen matches a window of commits from your repository against the tests' footprints and lists the tests that reached the change, the changed lines nothing reached, and a risk ranking.
- 04
Put it in the pipeline
The CLI uses the agent token the pipeline already has.
coverageops select --base origin/main --format skip # or pytest --coverops-select, # COVERAGEOPS_SELECT=true for JUnit 5 / TestNG coverageops gate --base origin/main --min-changed 80Selection skips only tests whose recorded footprint misses the change. A new test, a test with no footprint and a test whose own file changed always run, and when the change touches code no agent measures the whole suite runs.
The gate exits 0 (pass), 1 (fail) or 2 (misconfigured) and posts a commit status to GitHub, GitLab, Azure DevOps or Bitbucket. The gate endpoint answers every request with a verdict and leaves the decision to the pipeline.
Agents by language
Setup and measurement differ by runtime. This is what each agent needs and reports.
| Language | How it attaches | Line and method coverage | Branch coverage | Per test |
|---|---|---|---|---|
| Java (JVM) | One -javaagent flag | Yes | Yes | Lines each test ran |
| Node.js | One --require (or NODE_OPTIONS) entry | Yes | Yes | Lines each test ran |
| .NET | A post-build weaving step and a startup hook | Yes | No | Lines each test ran |
| PHP | auto_prepend_file, with the pcov or Xdebug extension | Yes | No | Lines each test ran |
| Python | The agent package and a one-line WSGI or ASGI middleware | Yes | No | Lines each test ran |
| Go | Build with -cover -covermode=atomic and add the middleware (a code change) | Yes | No | Lines each test ran |
Where CoverOps runs
Cloud
The hosted service on AWS in Frankfurt (eu-central-1). Nothing to install besides the agents.
Private cloud or on-prem
Docker Compose, Helm or Terraform in your own infrastructure, with install, backup and health-check scripts.
Air-gapped
An offline bundle for networks without internet access, licensed with a signed licence file.
Which options a package includes is on the pricing page; what is stored, and where, is on the security page.
Plan the first service with us
In a demo we pick the service and suite to start with and show what the agent setup looks like on your runtime.