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.

Feed endpoints
GET /api/v1/api-tester/test-runs?mode=<mode>&referenceId=<uuid>
GET /api/v1/api-tester/test-runs/:id
GET /api/v1/api-tester/test-runs/:id/report?format=<fmt>
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/mockarty-go"
)
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.
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. - Audit: every report export writes an audit entry with action
test_run_report_exportand{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.