Skip to content

The HTML report summary does not count risky tests, so the Total does not reconcile #1252

Description

@Chemaclass

Problem

For a run of one passing and one risky test, the HTML summary reads:

Total Tests Passed Failed Incomplete Skipped Snapshot
2 1 0 0 0 0

The visible categories sum to 1 against a Total of 2, and nothing on the page says where the second test went. The row exists in the per-file table, coloured with the .risky class the stylesheet already defines — it is only the summary that never counts it.

Both other renderers report it:

console:  Tests:      1 passed, 1 risky, 2 total
markdown: | Passed | 1 |  | Failed | 0 |  | Risky | 1 |

bashunit::state::get_tests_risky and get_tests_flaky exist; src/reports/html.sh simply never calls them.

Flaky

Flaky already reconciles, because a flaky test stays inside the pass total (Total 1, Passed 1, matching the console). But the console and the Markdown report both surface the number while the HTML summary drops it, so it belongs in the table for parity rather than for arithmetic.

Fix

Add Risky and Flaky columns, using the counters that already exist. markdown.sh is the reference for which categories a summary carries: Passed, Failed, Skipped, Incomplete, Snapshot, Risky, Flaky.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

Status
Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions