Reporters
The five built-in reporters, what each writes, and the reporter interface for your own.
Choose reporters with --reporter name (to stdout) or --reporter name=path (to a file, parent directories
created), repeatable. With none given, the CLI uses pretty. Both languages produce the same output for the same
run, apart from timings and the tool block that names the language.
| Name | Writes | Use it for |
|---|---|---|
pretty | one line per case, failed assertions with x, a stats line, and a summary | terminals |
json | the evals/report/v1 report: counts, ok, recorded runs, every verdict with every assertion | your own tooling, dashboards |
junit | JUnit XML: one testsuite per case file, one testcase per case | CI test result views |
markdown | a summary table and a collapsible section per failing case, capped at 60,000 characters | pull request comments, job summaries |
github | ::error workflow annotations on the case file, plus the markdown summary appended to $GITHUB_STEP_SUMMARY | GitHub Actions; added automatically when GITHUB_ACTIONS=true |
langfuse, braintrust, langsmith, phoenix, otel | every verdict and assertion score to that platform | observability platforms; see score exporters |
In pytest, --viewport-report json=path (also junit and markdown) writes the same reports for the YAML cases
pytest collected.
Separately from reporters, every local run writes the results directory that
viewport-evals ui serves. With a model matrix, pretty, markdown and github add a table with one row per
model; with --repeat, they mark each failure flaky or regressed.
Output
The same failing case through each reporter. pretty:
FAIL refund-happy-path 5ms
x tools.exactly: expected exactly lookup_order; got lookup_order > issue_refund
x tools.calls[0](issue_refund): args.amount: expected <= 10, got 42.5
tools: lookup_order > issue_refund | 3 model calls | 423 tokens | $0.002025
1 failed (rescore) in 0.01smarkdown:
### Viewport Evals: 1 failed (rescore) in 0.00s
| Status | Case | Runs | Why |
|---|---|---|---|
| FAIL | `refund-happy-path` | 1 | `tools.exactly: expected exactly lookup_order; got lookup_order > issue_refund` |Case ids, file names, messages, model output and tool results sit in code spans (and in <code> in the
<summary> line), fenced longer than any backtick run inside, so nothing in them renders as HTML, a link, an
@ mention or a #123 issue reference.
github:
::error file=evals/refund-happy-path.yaml,line=1,title=viewport-evals%3A refund-happy-path::tools.exactly: expected exactly lookup_order; got lookup_order > issue_refund%0Atools.calls[0](issue_refund): args.amount: expected <= 10, got 42.5json (abridged):
{
"$schema": "https://getviewport.com/schemas/evals/report/v1.json",
"counts": { "error": 0, "fail": 1, "pass": 0, "skip": 0, "xfail": 0, "xpass": 0 },
"mode": "rescore",
"ok": false,
"recorded": 0,
"tool": { "language": "typescript", "package": "@viewportai/evals", "version": "0.1.0" },
"verdicts": [{ "id": "refund-happy-path", "status": "fail", "passes": 0, "required": 1, "runs": ["..."] }]
}recorded counts runs that called a real model and wrote a fixture. It is always 0 in CI.
Your own reporter
A reporter is an object with a name and three optional hooks: on_run_start(info) / onRunStart(info),
on_case_done(verdict) / onCaseDone(verdict) and on_run_end(report) / onRunEnd(report); any may be async.
The built-ins are exported (pretty_reporter, json_reporter, junit_reporter, markdown_reporter,
github_reporter, reporter_for(spec), combine_reporters; TypeScript uses camelCase), along with the formatters
behind them (verdict_lines, format_junit, format_markdown, format_json_report), for use with
run_cases(..., reporters=[...]) / runCases(cases, { reporters }), which call every hook in the same order as the
CLI. The CLI accepts only the built-in names in 0.1.