Reports
The report formats Parity writes — JSON, HTML, JUnit, Markdown and terminal — an overview of the parity.report/v1 schema, and the report and upload commands.
Every parity compare run writes one JSON report. Every other format is a rendering of that file, so you can produce it during the run or later, on another machine, from the JSON alone.
#Formats
| Format | During compare | Later, with parity report | For |
|---|---|---|---|
| JSON | -o, --output <FILE> (always written; default .parity/report.json) | -f json | Machines, archiving, upload. The source of truth. |
| Terminal | printed | -f pretty (default) | Reading a result where you ran it. |
| HTML | --html <FILE> | -f html, or --open | Reviewing and sharing. One self-contained file. |
| JUnit XML | --junit <FILE> | -f junit | CI systems that display test results. |
| Markdown | --summary <FILE> | -f markdown | Job summaries and pull request comments. |
Reports are redacted before they are written: credentials, sensitive headers and sensitive fields never reach the file. See redaction.
#parity report
Renders an existing report. Without arguments it reads .parity/report.json and prints the terminal view.
parity report
parity report path/to/report.json --format markdown
parity report --format junit --output parity.junit.xml
parity report --open| Argument | Default | Meaning |
|---|---|---|
[FILE] | .parity/report.json | The report to render. |
-f, --format <FORMAT> | pretty | pretty, markdown, junit, html or json. |
-o, --output <FILE> | stdout | Write to a file. |
--open | off | Write an HTML report next to the JSON one and open it in the default browser. |
--exit-code | off | Exit with the report's policy exit code instead of 0. |
-v, --verbose | off | Print every difference and every scenario. |
By default the terminal view prints scenarios that are not unchanged, and collapses the same change repeated across array elements into one line ($.items[*].currency was added ×5). --verbose prints everything.
#The HTML report
--open writes report.html next to the JSON file and launches the browser:
html .parity/report.htmlThe file is self-contained — no network requests, no external scripts or fonts — so it can be attached to a pull request, stored as a build artifact or sent by e-mail. The report is embedded as inert JSON and rendered as text, so response content cannot run as markup or script in the page.
#The report schema
Reports declare "schema": "parity.report/v1". Fields may be added within v1; existing fields keep their meaning. Consumers should ignore fields they do not know, and parity report refuses files with a different schema.
A TypeScript description of the whole document is in packages/report/src/index.ts; the Rust definition it mirrors is crates/parity-engine/src/report.rs.
#Top level
{
"schema": "parity.report/v1",
"run": {},
"summary": {},
"policy": {},
"comparison": {},
"scenarios": []
}| Key | Contents |
|---|---|
run | When, with what, against what. |
summary | Counts. |
policy | The policies in force, the verdict and the exit code. |
comparison | The global comparison rules the run used. |
scenarios | One entry per scenario, in source order. |
#run
{
"id": "run_54a0d7e286eb1bb508734b95",
"started_at": "2026-11-28T15:59:49Z",
"finished_at": "2026-11-28T15:59:49Z",
"duration_ms": 25,
"seed": 42,
"nonce": "d320cc44",
"tool": { "name": "parity", "version": "0.1.0" },
"config_fingerprint": "sha256:ebc8d505a4c89812bcf191634ea655075142e68298a4686cfc1c815ec590398a",
"cancelled": false,
"dry_run": false,
"baseline": { "name": "baseline", "url": "http://localhost:8080" },
"candidate": { "name": "candidate", "url": "http://localhost:8081" }
}baseline and candidate also carry revision when one was given. git (repository, ref, pull_request, workflow_run_url) is present when the run happened in GitHub Actions or --pull-request was passed. URLs are stored without credentials and with sensitive query parameters redacted.
seed and nonce together reproduce the inputs of a run; config_fingerprint identifies how it compared.
#summary and policy
{
"summary": { "total": 89, "unchanged": 73, "changed": 14, "errors": 0, "inconclusive": 2, "skipped": 0, "differences": 42, "requests": 209 },
"policy": {
"unexpected_changes": "fail",
"environment_errors": "fail",
"inconclusive": "warn",
"verdict": "fail",
"exit_code": 1,
"violations": ["14 scenarios with behavioural changes"],
"warnings": ["2 scenarios were inconclusive"]
}
}verdict is pass when violations is empty. exit_code is the code compare exited with.
#Scenarios
{
"id": "workflow:order-lifecycle",
"name": "Order lifecycle with discount",
"description": "Create a customer and an order, apply a discount, then read the order back.",
"source": { "kind": "workflow", "file": "tests/parity/order-lifecycle.yaml" },
"tags": ["orders", "stateful"],
"outcome": "changed",
"duration_ms": 3,
"mutating": true,
"state_verified": true,
"steps": []
}| Field | Meaning |
|---|---|
id | Stable scenario id (openapi:…, workflow:…, request:…, postman:…). |
source | kind (openapi, workflow, request, postman), file, and for generated scenarios operation and variation. |
outcome | unchanged, changed, error, inconclusive or skipped. |
reason, reason_code | Present when the outcome needs explaining. See reason codes. |
mutating | Whether any step uses a method other than GET, HEAD, OPTIONS or TRACE. |
state_verified | For mutating scenarios: whether a compared read follows the last mutation. Absent for read-only scenarios. |
#Steps
Each step records what was sent and received in both environments.
| Field | Meaning |
|---|---|
id, name, phase | phase is setup, step or teardown. |
compared | Whether the step's responses were compared. |
outcome, reason | The step's own result. |
baseline, candidate | An exchange: request (method, url, headers, body or body_text), response (status, headers, body or body_text, body_bytes, truncated, duration_ms) and error (kind, message) when the request failed. |
differences | The differences found in this step. |
extracted | Variables captured by extract, per environment. |
Response bodies of unchanged scenarios are left out unless report.include_unchanged_bodies is set, and bodies larger than report.max_body_bytes are left out with truncated: true. Both are still compared in full.
#Differences
{
"id": "d_fb33fd1d1df053bb4e28e499",
"kind": "value_changed",
"location": "body",
"path": "$.total",
"baseline": 57.59,
"candidate": 63.99,
"message": "`$.total` changed from 57.59 to 63.99 (Δ +6.4).",
"delta": 6.399999999999999
}| Field | Meaning |
|---|---|
id | A fingerprint of the scenario id, step id, location, path, kind and both values. The same difference in a later run has the same id. |
kind | See difference kinds. |
location | status, header, body or assertion. |
path | A concrete JSONPath for body differences, the header name for headers, status for the status. |
baseline, candidate | The two values. A key that is absent means the value does not exist on that side; null means it exists and is null. |
message | The sentence shown in every rendering. |
delta | Candidate minus baseline, for numeric changes. |
nondeterministic | true when the location also varies between two baseline runs. |
redacted | true when the values were withheld; the location and kind are still reported. |
#parity upload
Sends a finished report to a hosted workspace. This is optional; nothing else in Parity depends on it.
export PARITY_TOKEN=pty_…
parity upload .parity/report.json| Argument | Default | Meaning |
|---|---|---|
[FILE] | .parity/report.json | The report to send. |
--api-url <URL> | https://parity.x1991labs.com (or PARITY_API_URL) | The workspace to send it to. |
The token is read from PARITY_TOKEN only. parity compare --upload does the same thing at the end of a run; there, an upload problem is printed as a warning and never changes the exit code, because it is not a behavioural result.
Uploading the same report twice is harmless: the run id is sent as an idempotency key and the second upload is reported as already present. The CLI refuses to send a token over plain HTTP to a non-local host.