Pre-release. Parity is not publicly available yet: the CLI, the GitHub Action and the hosted workspace open at launch. The demo runs on example data.

Skip to content

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

FormatDuring compareLater, with parity reportFor
JSON-o, --output <FILE> (always written; default .parity/report.json)-f jsonMachines, archiving, upload. The source of truth.
Terminalprinted-f pretty (default)Reading a result where you ran it.
HTML--html <FILE>-f html, or --openReviewing and sharing. One self-contained file.
JUnit XML--junit <FILE>-f junitCI systems that display test results.
Markdown--summary <FILE>-f markdownJob 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.

bash
parity report
parity report path/to/report.json --format markdown
parity report --format junit --output parity.junit.xml
parity report --open
ArgumentDefaultMeaning
[FILE].parity/report.jsonThe report to render.
-f, --format <FORMAT>prettypretty, markdown, junit, html or json.
-o, --output <FILE>stdoutWrite to a file.
--openoffWrite an HTML report next to the JSON one and open it in the default browser.
--exit-codeoffExit with the report's policy exit code instead of 0.
-v, --verboseoffPrint 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.html

The 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

json
{
  "schema": "parity.report/v1",
  "run": {},
  "summary": {},
  "policy": {},
  "comparison": {},
  "scenarios": []
}
KeyContents
runWhen, with what, against what.
summaryCounts.
policyThe policies in force, the verdict and the exit code.
comparisonThe global comparison rules the run used.
scenariosOne entry per scenario, in source order.

#run

json
{
  "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

json
{
  "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

json
{
  "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": []
}
FieldMeaning
idStable scenario id (openapi:…, workflow:…, request:…, postman:…).
sourcekind (openapi, workflow, request, postman), file, and for generated scenarios operation and variation.
outcomeunchanged, changed, error, inconclusive or skipped.
reason, reason_codePresent when the outcome needs explaining. See reason codes.
mutatingWhether any step uses a method other than GET, HEAD, OPTIONS or TRACE.
state_verifiedFor 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.

FieldMeaning
id, name, phasephase is setup, step or teardown.
comparedWhether the step's responses were compared.
outcome, reasonThe step's own result.
baseline, candidateAn 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.
differencesThe differences found in this step.
extractedVariables 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

json
{
  "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
}
FieldMeaning
idA fingerprint of the scenario id, step id, location, path, kind and both values. The same difference in a later run has the same id.
kindSee difference kinds.
locationstatus, header, body or assertion.
pathA concrete JSONPath for body differences, the header name for headers, status for the status.
baseline, candidateThe two values. A key that is absent means the value does not exist on that side; null means it exists and is null.
messageThe sentence shown in every rendering.
deltaCandidate minus baseline, for numeric changes.
nondeterministictrue when the location also varies between two baseline runs.
redactedtrue 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.

bash
export PARITY_TOKEN=pty_…
parity upload .parity/report.json
ArgumentDefaultMeaning
[FILE].parity/report.jsonThe 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.

    Loading the index…