Bruno's CLIGenerate Reports

Generating Reports

Bruno CLI provides built-in support for generating reports in three formats: JSON, JUnit, and HTML. These reports help with analyzing test results and integrating with various CI/CD tools.

You can generate any combination of these reports and even run them simultaneously.

JSON Report

To generate a report in JSON format, use the --reporter-json option:

bru run request.bru --reporter-json results.json

This will output the test results in a results.json file, which can be useful for further processing or programmatic analysis.

JUnit Report

To generate a report in JUnit format, use the --reporter-junit option:

bru run request.bru --reporter-junit results.xml

The results.xml file will be in a format compatible with JUnit, making it ideal for integration with CI/CD pipelines that rely on JUnit reporting.

HTML Report

To generate a human-readable HTML report, use the --reporter-html option:

bru run request.bru --reporter-html results.html

This will create an results.html file that provides a visual representation of the test outcomes, ideal for quick reviews.

Running Multiple Reporters Simultaneously

You can generate multiple reports at once by specifying more than one reporter option. For example, to generate JSON, JUnit, and HTML reports simultaneously, run:

bru run request.bru --reporter-json results.json --reporter-junit results.xml --reporter-html results.html

This command will create three files: results.json, results.xml, and results.html, allowing you to analyze the results in different formats as needed.

Skipping Specific Headers in the Report

If you want to exclude certain headers from the report, use the --reporter-skip-headers option. You can list multiple headers to skip, separated by spaces.

bru run --reporter-html results.html --reporter-skip-headers "Authorization" "Content-Type" "Date"

Skip All Headers in the Report

To exclude all headers from the report, use the --reporter-skip-all-headers option. This will remove all headers from the output report, ensuring a cleaner result.

bru run --reporter-html results.html --reporter-skip-all-headers