feat(cli): JUnit + JSON reporters for run-all (CI integration)#16
Merged
Conversation
`forge run-all` can now emit machine-readable reports for CI, matching the
pipeline outputs teams get from `bru run --reporter-junit/--reporter-json`:
forge run-all ./collection \
--reporter-junit report.xml \
--reporter-json report.json
Each `.http` file becomes a JUnit `<testsuite>` and each request a
`<testcase>`; transport errors map to `<error>`, failed assertions and
post-response `test()`s to `<failure>` (with the subject/op/expected/actual
detail). The JSON report carries a pass/fail summary plus the full,
already-serializable run results.
The report generation lives in a pure, unit-tested `forge_engine::report`
module (`junit_xml` / `json_report` over `ReportSuite` groups); the CLI
just accumulates runs per file and writes the requested formats.
https://claude.ai/code/session_016jgMTwiYCiZA8F9JMFGfWR
GamalAnwar
added a commit
that referenced
this pull request
Jun 18, 2026
`forge run-all` can now emit machine-readable reports for CI, matching the
pipeline outputs teams get from `bru run --reporter-junit/--reporter-json`:
forge run-all ./collection \
--reporter-junit report.xml \
--reporter-json report.json
Each `.http` file becomes a JUnit `<testsuite>` and each request a
`<testcase>`; transport errors map to `<error>`, failed assertions and
post-response `test()`s to `<failure>` (with the subject/op/expected/actual
detail). The JSON report carries a pass/fail summary plus the full,
already-serializable run results.
The report generation lives in a pure, unit-tested `forge_engine::report`
module (`junit_xml` / `json_report` over `ReportSuite` groups); the CLI
just accumulates runs per file and writes the requested formats.
GamalAnwar
added a commit
that referenced
this pull request
Jun 18, 2026
`forge run-all` can now emit machine-readable reports for CI, matching the
pipeline outputs teams get from `bru run --reporter-junit/--reporter-json`:
forge run-all ./collection \
--reporter-junit report.xml \
--reporter-json report.json
Each `.http` file becomes a JUnit `<testsuite>` and each request a
`<testcase>`; transport errors map to `<error>`, failed assertions and
post-response `test()`s to `<failure>` (with the subject/op/expected/actual
detail). The JSON report carries a pass/fail summary plus the full,
already-serializable run results.
The report generation lives in a pure, unit-tested `forge_engine::report`
module (`junit_xml` / `json_report` over `ReportSuite` groups); the CLI
just accumulates runs per file and writes the requested formats.
GamalAnwar
added a commit
that referenced
this pull request
Jun 18, 2026
`forge run-all` can now emit machine-readable reports for CI, matching the
pipeline outputs teams get from `bru run --reporter-junit/--reporter-json`:
forge run-all ./collection \
--reporter-junit report.xml \
--reporter-json report.json
Each `.http` file becomes a JUnit `<testsuite>` and each request a
`<testcase>`; transport errors map to `<error>`, failed assertions and
post-response `test()`s to `<failure>` (with the subject/op/expected/actual
detail). The JSON report carries a pass/fail summary plus the full,
already-serializable run results.
The report generation lives in a pure, unit-tested `forge_engine::report`
module (`junit_xml` / `json_report` over `ReportSuite` groups); the CLI
just accumulates runs per file and writes the requested formats.
GamalAnwar
added a commit
that referenced
this pull request
Jun 18, 2026
`forge run-all` can now emit machine-readable reports for CI, matching the
pipeline outputs teams get from `bru run --reporter-junit/--reporter-json`:
forge run-all ./collection \
--reporter-junit report.xml \
--reporter-json report.json
Each `.http` file becomes a JUnit `<testsuite>` and each request a
`<testcase>`; transport errors map to `<error>`, failed assertions and
post-response `test()`s to `<failure>` (with the subject/op/expected/actual
detail). The JSON report carries a pass/fail summary plus the full,
already-serializable run results.
The report generation lives in a pure, unit-tested `forge_engine::report`
module (`junit_xml` / `json_report` over `ReportSuite` groups); the CLI
just accumulates runs per file and writes the requested formats.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds CI-friendly reporters to
forge run-all, so teams running collections in pipelines get the same machine-readable outputs they get today frombru run --reporter-junit/--reporter-json— removing a switching cost for Bruno/Newman users..httpfile becomes a<testsuite>and each request a<testcase>. Transport errors map to<error>; failed assertions and post-responsetest()s map to<failure>with thesubject op expected (got actual)detail. Names/values are XML-escaped. Consumable by GitHub Actions, GitLab, Jenkins, etc.{ summary: { total, passed, failed }, suites: [...] }document carrying the full, already-serde-serializable run results.Design
Report generation is a pure, unit-tested
forge_engine::reportmodule (junit_xml/json_reportoverReportSuitegroups) — the CLI just accumulates runs per file and writes the requested formats. This keeps the logic in the well-tested engine layer rather than the binary.Testing
<failure>/<error>shapes, XML escaping, empty input).report.xml/report.jsoncontents and that nothing is written when no reporter flag is passed.report.rsat ~99% line coverage; workspace stays above the 95% gate.🤖 Generated with Claude Code
Generated by Claude Code