feat(reports): add --report-json <file> for machine-readable output#759
Merged
Conversation
…741) Write JSON results (summary counts + per-test records) so scripts, dashboards and bots can consume bashunit output without parsing human text. Strings are escaped in pure Bash (no jq dependency). Mirrors the existing report writers; like them, per-test rows come from a sequential run and the file stays valid JSON under --parallel. Closes #741
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.
🤔 Background
Related #741
JUnit XML and HTML already exist, but JSON is the friendliest format for custom tooling (jq, GitHub Action summaries, flaky-test trackers) to consume results without parsing human text or XML.
💡 Changes
--report-json <file>(andBASHUNIT_REPORT_JSON): writes a summary (counts + duration) plus per-test records (file, name, status, duration, message).jqdependency to produce it.--parallel.