Skip to content

Reports

Source files: src/report/markdown.ts, src/report/json.ts

The report module produces persistent output after tests complete. Two formats serve different audiences. The Markdown report (latest.md) is for humans — it shows what failed, the expected versus observed behaviour, the file location, and a suggested resolution. The JSON report (ci-results.json) is for CI/CD pipelines — a machine-readable pass/fail signal with just enough data to identify failures and their locations.

The latest.md file is overwritten on each run, giving a stable path that bookmarks and scripts can rely on. With the --timestamp flag, timestamped copies are also generated for historical tracking without losing the convenience of the stable path.

Generated by generateMarkdownReport(). Written to {output}/latest.md (and optionally a timestamped copy).

# Semantic Test Report
Run Timestamp: 2025-01-15T10:30:00.000Z
Project: semtest-runner
## Summary
| Metric | Count |
|---|---|
| Total Tests | 12 |
| Passed | 10 |
| Failed | 2 |
---
## Test Results
### FAIL auth-check
Source: auth-middleware.md
Status: FAIL
Expectation: ...
Observed: ...
Location: ...
Resolution: ...
---
## Validation Issues
- **duplicate-id**: ...
---
SectionAlways presentContent
HeaderYesTimestamp and project name
Summary tableYesCounts for total, passed, failed (+ errored, skipped, invalid if > 0)
Test ResultsYesOne subsection per test (passing tests excluded unless --include-passing)
Validation IssuesOnly if issues existBulleted list of validation issues
OptionEffect
includePassingPassing tests appear in the Test Results section
validationIf provided and has issues, a Validation Issues section is appended

Generated by generateJSONReport(). Written to {output}/ci-results.json.

interface CIResult {
status: "pass" | "fail" | "error";
summary: {
total: number;
passed: number;
failed: number;
errored?: number; // omitted if 0
invalid?: number; // omitted if 0
skipped?: number; // omitted if 0
};
tests: CITestEntry[];
validation?: ValidationResult; // omitted if not provided
}
interface CITestEntry {
id: string;
sourceFile: string;
status: TestStatus;
location?: string; // fail only
error?: string; // error only
}

The JSON report is intentionally minimal — it includes only the fields CI systems need to determine pass/fail and locate problems. Full diagnostic details are in the Markdown report.

FilePathWhen
Latest report{output}/latest.mdAlways
CI results{output}/ci-results.jsonAlways
Timestamped report{output}/{timestamp}.mdOnly with --timestamp
Debug logs{output}/debug/{testname}.jsonOnly with --debug