Record test results on a run

testrun.record_resultsChanges dataCreates, updates or deletes something in your workspace.

What it does

Saves the outcome of each test case onto a test run that already exists: Pass, Fail or Not Executed, plus optional details (what actually happened, the error text, a note, a screenshot). Use it after testrun.create was called without results and the tests have since been carried out (by you, an external runner or a person). Each case must already be part of the run. Each row is saved on its own: one bad row does not stop the rest, and fields you leave out keep their current values. Every recorded row is stamped with you as executor and the current time. Returns { success, message, updated, failed, results: [{ caseId, success, message?, affected?, mediaId?, evidenceWarning? }] }. NEXT: call pdlc.verify({ testRunId }) to get the deterministic verdict (pass / fail / in-progress) and the recommended next step.

Ask your agent

You don’t call testrun.record_results yourself. Say something like this to Claude Code, Cursor or another MCP-connected agent:

  • “I ran the checkout tests: 4 passed, the coupon one failed. Record that”
  • “Save the Playwright results to the test run”
  • “Mark the login test as failed with this screenshot”

Inputs

NameTypeDescription
testRunId
required
stringThe run to record onto: the id returned by testrun.create or listed by testrun.list (e.g. "AAtr-kzqd-mwpe-rtya-hbnc-xufo-lgsi"). Must belong to the connected workspace.
results
required
object[]One entry per test case, 1 to 500. Example: [{ "caseId": "AAtc-kzqd-…", "status": "Pass" }, { "caseId": "AAtc-mwpe-…", "status": "Fail", "actualResult": "No confirmation page", "issues": "Timeout 5000ms exceeded waiting for locator('#pay')" }].

The MCP call

What the agent’s MCP client sends (placeholders in angle brackets):

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "testrun.record_results",
    "arguments": {
      "testRunId": "<testRunId>",
      "results": [
        {
          "caseId": "<caseId>"
        }
      ]
    }
  }
}

Connect your agent

npx -y @testmaze/mcp init tmt_xxx
claude mcp add tm --scope project -- npx -y @testmaze/mcp

Create the token in your Test Maze workspace under Settings → MCP. Setup for Cursor, Cline, Gemini CLI and Codex CLI is shown there too.