HTML Execution Report¶
After running a test suite, api-tester-cli can generate a self-contained, single-page HTML
report that captures every detail of the run: summary statistics, per-test results, the exact
request that was sent, the full response, and a breakdown of each assertion failure.
The report is generated by passing the --report option to the run-suite / rs command.
Generating a Report¶
Pass the absolute path to an output directory with --report. The tool creates the directory
if it does not exist and writes the report file there. The filename is auto-generated — you do
not supply it yourself.
# JVM jar
java -jar target/api-tester-cli-0.0.1-SNAPSHOT.jar run-suite \
--suite=/path/to/suite.yml \
--report=/path/to/reports
# Alias form
rs --suite=/path/to/suite.yml --report=/path/to/reports
# Native binary
./target/api-tester-cli run-suite \
--suite=/path/to/suite.yml \
--report=/path/to/reports
After the run completes, the CLI prints a confirmation line:
Filename format¶
The generated filename follows this pattern:
<suiteName>— thenamefield from your YAML file with every non-alphanumeric character replaced by an underscore (_). For example, a suite named"My API Suite v1.0"becomesMy_API_Suite_v1_0.<timestamp>— the local date and time at report-generation time inyyyyMMddHHmmssformat.
Example filenames:
| Suite name in YAML | Generated filename |
|---|---|
"User API" |
test-suite_User_API_20260606142300.html |
"My Suite v1.0" |
test-suite_My_Suite_v1_0_20260606142300.html |
"smoke" |
test-suite_smoke_20260606142300.html |
Combining --report with Other Options¶
--report can be combined freely with all other run-suite options:
# Generate a report while running only tests tagged "smoke"
rs --suite=/path/to/suite.yml --tag=smoke --report=/tmp/reports
# Generate a report while running a single test by name
rs --suite=/path/to/suite.yml --test="Login Test" --report=/tmp/reports
# Generate a report and force JSON output to stdout at the same time
rs --suite=/path/to/suite.yml --no-ui --report=/tmp/reports
Report Structure¶
The report is a fully self-contained HTML file — all CSS is embedded inline and no JavaScript is required. Open it in any browser with no internet connection needed.
Header¶
The top of the page shows:
- Suite name — from the
namefield of your YAML - Suite description — from the optional
descriptionfield; omitted when blank - Generated timestamp — local date and time in
yyyy-MM-dd HH:mmformat
Summary statistics¶
Five color-coded cards display the aggregate result counts:
| Card | Color | Meaning |
|---|---|---|
| Passed | Green | Tests where every assertion succeeded |
| Failed | Red | Tests where one or more assertions failed |
| Skipped | Orange | Tests with a non-blank skip field in the YAML |
| Error | Purple | Tests that aborted due to an unexpected exception |
| Total | Grey | Sum of all four above |
Per-test sections¶
Each test case appears as a card. The card's left border color matches the result status (green/red/orange/purple). The card header shows:
- The result badge (
PASSED,FAILED,SKIPPED, orERROR) - The test name
- Assertion counts: how many assertions passed and how many failed
Below the header, three expandable sections may appear (using the native HTML <details> /
<summary> elements — no JavaScript):
Request¶
Shows the HTTP request that was sent to the server:
- Method + URL — for example
GET https://api.example.com/users - Request headers — all headers sent, including
Authorization,Content-Type, etc. - Request body — the raw body text, when a body was included
Response¶
Shows what the server returned:
- Status code — the HTTP response status (e.g.
200,404) - Response time — the round-trip duration in milliseconds
- Response headers — all headers returned by the server
- Response body — the body as it was received; JSON responses are pretty-printed for
readability. If no assertions in the test required reading the response body, a notice
is displayed instead:
Body was not extracted because this test has no assertions that require the response body.
Failed Assertions¶
Visible only for tests with at least one failed assertion. Lists each failure with:
- Description — what was being checked (e.g.
status_code: expected 200) - Expected — the value the assertion expected
- Actual — the value that was actually found
- Error message — additional context, when available
The Failed Assertions section is automatically expanded when a test has failures so the details are immediately visible on page load.
Skipped Tests¶
When a test has a non-blank skip field in the YAML, the card shows:
No request or response sections appear for skipped tests.
Example¶
Run this command against the example suite in the repository:
rs --suite=src/test/resources/test-suite-1.yml \
--report=/tmp/reports \
api_base_url=https://api.restful-api.dev
Then open the generated file in your browser: