Docs Unified Test Runs

Unified Test Runs

Mockarty records every execution — functional API-tester collection runs,
load tests, fuzz campaigns, chaos experiments and contract verifications —
in a single Test Runs feed. This guide covers listing runs, fetching a
single run, and downloading an aggregated report in any of six formats.

Test Runs feed

Saved filters

Set the search, status, type and sort order, then use the bookmark button to
save them under a name. Select the name in Saved filters to apply it.
The delete button removes the selected preset. Presets are stored in this
browser profile.

Saving a functional report as PDF

Select Export PDF report on the run to open its full printable report.
Choose Print / Save as PDF, then select PDF in the print dialog. In the
installed Desktop app, select Back to reports to return to the run list.
In a web browser, the report opens in a new tab.

Sharing a local collection result with Company

For a signed-in owner on a Company-connected Desktop, a full local run of
one shared collection can publish a summary after the local report is saved.
Start the collection in API Tester, select local execution, and run all its
requests. This also works through POST /api/v1/api-tester/collections/:id/execute.
The summary contains the run and collection identifiers, completion time,
duration, status and totals. Request and response contents, logs and
environment values stay in the local report.

Company clients with current Testing access can retrieve the result while
they belong to that Space and can still read the shared collection. An
interrupted run, failed local save, or Company connection unavailable when
the run starts leaves the result local.

Stopping a run

When Stop is available for an active run, confirm the action in the dialog.
Canceling or closing the dialog leaves the run unchanged. If confirmation is
unavailable, or the account, Space or page changes while the dialog is open,
the stop request is not sent. After confirming, check the run’s final status;
confirmation alone does not mean that execution has already stopped.

Feed endpoints

GET /api/v1/api-tester/test-runs?mode=<mode>&referenceId=<uuid>&collectionId=<uuid>
GET /api/v1/api-tester/test-runs/:id
GET /api/v1/api-tester/test-runs/:id/report?format=<fmt>

Use collectionId to find functional runs that included a specific collection, including runs of several collections. referenceId matches the run’s source (for example, a collection, load configuration, or Test Plan). Either filter works with the default all-mode feed. When you send both, the run must match both. Unknown IDs return an empty page. An invalid UUID in referenceId with an explicit non-functional mode returns HTTP 400. total and X-Total-Count count all matching runs before limit and offset are applied.

For the MCP tool aggregate_test_runs_report, pass the run IDs as runIds. Existing calls with run_ids still work. Supply one spelling per call.

Supported modes

Mode Source
functional API-tester collection runs
load Performance/load tests
fuzz Fuzzing campaigns (referenceId → fuzz config id)
chaos Chaos experiments (referenceId → chaos experiment id)
contract Contract verifications (referenceId → contract id)
test_plan Test Plan runs (referenceId → plan id)
ui_test Standalone UI test replays (referenceId → UI test id). A UI test executed inside a Test Plan is covered by that plan’s own run, not listed separately

Unified report endpoint

GET /api/v1/api-tester/test-runs/:id/report?format=<fmt>

A single endpoint that aggregates run artefacts into six output formats:

format Content type Use case
allure_zip application/zip Allure CLI / Allure TestOps ingestion
allure_json application/json Diff tooling, custom dashboards
junit application/xml Jenkins, Surefire, GitLab CI
markdown text/markdown Slack / wiki paste
unified_json application/json Mockarty-native envelope (default)
html text/html Self-contained report, no external JS/CSS

Comments on a run report

Open the report and select Comments to discuss its results. A comment
belongs to the current namespace, run type, and run ID; reports of different
types keep separate discussions even if their IDs match. Deleted comments
disappear from the thread and are removed after the configured retention
period. The downloadable report formats above do not include comments.

Fuzz findings, chaos fault outcomes and contract case results expand into
one AllureResult row per sub-item. Functional / load / merged runs emit a
single run-level summary row.

Every fetch is logged to the audit trail under the
test_run_report_export verb so SOC dashboards can track
data-egress events.

SDK examples

Go

import (
    "context"
    "os"

    mockarty "github.com/mockarty/go-sdk"
)

client := mockarty.NewClient("http://localhost:5770", "mk_...")
data, err := client.TestRuns().GetTestRunReport(
    context.Background(),
    "97c1f7a6-1a2f-4d9e-8a1b-000000000001",
    mockarty.TestRunReportFormatJUnit,
)
if err != nil {
    panic(err)
}
_ = os.WriteFile("report.xml", data, 0o644)

Python

from mockarty import MockartyClient
from mockarty.api.testruns import TEST_RUN_REPORT_FORMAT_ALLURE_ZIP

client = MockartyClient("http://localhost:5770", api_key="mk_...")
zip_bytes = client.test_runs.get_report(
    "97c1f7a6-1a2f-4d9e-8a1b-000000000001",
    format=TEST_RUN_REPORT_FORMAT_ALLURE_ZIP,
)
with open("results.zip", "wb") as f:
    f.write(zip_bytes)

Java

import ru.mockarty.MockartyClient;
import ru.mockarty.api.TestRunApi;

MockartyClient client = new MockartyClient("http://localhost:5770", "mk_...");
byte[] md = client.testRuns().getTestRunReport(
    "97c1f7a6-1a2f-4d9e-8a1b-000000000001",
    TestRunApi.TEST_RUN_REPORT_FORMAT_MARKDOWN
);
java.nio.file.Files.write(java.nio.file.Paths.get("report.md"), md);

CLI

# List all runs in unified feed
mockarty-cli test-runs list

# Filter to one mode
mockarty-cli test-runs list --mode fuzz

# Fetch one run (JSON)
mockarty-cli test-runs get <uuid>

# Download the report
mockarty-cli test-runs report <uuid> --format junit --output report.xml
mockarty-cli test-runs report <uuid> --format allure_zip --output results.zip
mockarty-cli test-runs report <uuid> --format markdown

MCP tool

The MCP server exposes list_test_runs, get_test_run and
get_test_run_report, so agent-driven workflows can query the run feed and
pull the aggregated report as JSON without wiring a custom HTTP client.
get_test_run_report’s format field is reserved for forward compatibility
and is currently ignored — it always returns the JSON report.

The six-format export above is a REST/CLI/SDK surface only: use
GET /api/v1/api-tester/test-runs/:id/report?format=<fmt> directly, or the
SDK / mockarty-cli test-runs report commands, when you need Allure, JUnit,
Markdown or HTML.

Functional exports show the recorded request names, outcomes and durations.
The export includes a run summary when request details are unavailable or
a collection-wide failure has no matching request outcome.

Security and access control

  • RBAC: the caller must own the run, share its namespace, or hold an
    elevated system role (admin/support).
  • Namespace scoping: responses are filtered to the caller’s namespace
    unless the caller has elevated role.
  • Functional request details: the executor sees all saved requests.
    Other members of the run’s Space see only requests from collections
    they can currently access.
  • Audit: every report export writes an audit entry with action
    test_run_report_export and {format, mode} in the changes payload.

Deterministic output

All six formats emit byte-stable output — identical inputs produce
identical bytes, including:

  • sorted AllureResult labels, parameters and attachments;
  • millisecond-precision timestamps;
  • fixed zip entry order and modification time.

This lets CI jobs checksum the report for retry detection and caching.