States on an HTML page how many of its scenarios pass
All 4 scenarios hold
Every HTML page states how many of its scenarios pass. A reader arriving at a spec can then see whether the code still does what the page says. A table page counts its own rows. An index page adds up the pages below it.
The rules below read a report of a run of two test classes. AdditionSample publishes the table sums, whose two rows both pass. SubtractionSample publishes the table differences. One of those two rows claims the wrong answer. The report root is the index above the two class pages.
A page with a broken scenario states the count of what is broken first, because a reader needs that count first. A page where every scenario passes says so in one line.
An index page counts no scenario twice, and counts no scenario that is not below it. The root's numbers are therefore the two class pages added together.
| Scenario | Page URL | Verdict? |
|---|---|---|
| A table where every row passes | /addition-sample/sums | All 2 scenarios hold |
| A table with a broken row | /subtraction-sample/differences | 1 of 2 scenarios broken |
| The index above one table | /addition-sample | All 2 scenarios hold |
| The index above both classes | / | 1 of 4 scenarios broken |