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

diagnose_run

A failed run's full failure context in one call.

Everything needed to diagnose a failed run, in one call: the failing tests with fuller error messages, the feature's current Gherkin, the executed spec sources, artifact download links, and the log tail. It replaces the get_runread_fileget_run_artifacts round trips an agent otherwise needs before it can fix anything.

Request

GET /api/v1/ops/projects/{project}/runs/{runId}/diagnosis
Parameter
In
Type
Required
Description

project

path

string

yes

The project's public id.

runId

path

integer

yes

The run id.

curl -H "Authorization: Bearer $TESTVIBE_API_KEY" \
  "$TESTVIBE_SERVER/api/v1/ops/projects/$PROJECT/runs/214/diagnosis"
testvibe runs diagnose 214          # readable digest
testvibe runs diagnose 214 --json   # includes the Gherkin and spec sources

Tool diagnose_run{ "runId": 214 }. Use this first when a run fails.

Response

{
  "runId": 214,
  "status": "failed",
  "verdict": "failed",
  "featureId": 12,
  "featureName": "Login Functionality",
  "config": "Default",
  "siteUrl": "https://demo.example",
  "finishedUtc": "2026-06-11T09:15:42Z",
  "summary": { "total": 3, "passed": 2, "failed": 1 },
  "failures": [
    {
      "name": "Login > locked out user",
      "status": "failed",
      "durationMs": 12044,
      "error": "TimeoutError: locator.click: Timeout 10000ms exceeded …"
    }
  ],
  "featureStatus": "generated",
  "gherkin": "Feature: Login Functionality\n  …",
  "specs": [
    { "path": "Features/Default/Login Functionality.js", "content": "// executed spec source …" }
  ],
  "log": "…last 4000 chars of the run log…",
  "artifacts": [
    { "kind": "screenshot", "path": "", "size": 48211, "url": "https://…(short-lived)" }
  ],
  "hint": "Selector or timing failures in the spec usually mean the Gherkin needs tightening …"
}

A run that passed returns "verdict": "passed" with the summary and no failure context; a run still executing returns "verdict": "running" — wait for it first (wait_for_run).

Field
Notes

failures

Non-passed tests only, errors trimmed at 6,000 chars (vs 1,500 in get_run).

gherkin / featureStatus

The feature's current source — absent when the feature was deleted since the run.

specs

The executed spec files' stored content (first 5 files, 8,000 chars each; specsTruncated: true when capped).

artifacts

Same short-lived links as get_run_artifacts.

Errors

HTTP
When

404 not_found

No such run in this project.

Last updated

Was this helpful?