For the complete documentation index, see llms.txt. This page is also available as Markdown.

run_coverage

Start an execution-coverage run for a build/test target.

Start an execution-coverage run for a build/test target: TestVibe clones the connected repo, builds it, runs its tests with coverage instrumentation, and ingests the resulting report into the coverage snapshot. Returns immediately; the run executes in the background.

Request

POST /api/v1/ops/projects/{project}/coverage/run
Parameter
In
Type
Required
Description

project

path

string

yes

The project's public id.

target

body

integer

no

Coverage target id (see get_coveragetargets). Optional when the project has exactly one target.

curl -X POST -H "Authorization: Bearer $TESTVIBE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"target": 5}' \
  "$TESTVIBE_SERVER/api/v1/ops/projects/$PROJECT/coverage/run"
testvibe coverage run --target 5 --wait

Tool run_coverage — optional project and target. Poll list_coverage_runs (or get_coverage's runActive).

Response

202 Accepted

{ "coverageRunId": 12, "targetId": 5, "status": "running" }

Poll list_coverage_runs (or get_coverage's runActive) until it leaves running.

Errors

HTTP
When

400 invalid_request

Several targets exist and no target was given.

404 not_found

No such coverage target in this project.

409 conflict

A coverage run is already in progress, no targets detected, or no source repository is connected.

Last updated

Was this helpful?