Review the health of your test suite
The Suite Health audit reviews the whole test suite periodically and
recommends tests for a person to look at: tests that execute exactly the
same lines as another, slow tests that add no coverage of their own, and
chronically flaky tests. Fistron never deletes or edits a test. People
decide in the repository’s setting suite-health on Repository
settings in Fistron, and the team changes its tests through its own pull
or merge requests. Fistron proposes the recommendations as a change of the
setting, which waits under Proposed changes for a manager.
Before you start
- A CI history of the project (Run and schedule work):
- outcomes and durations of every test, for slow tests;
- per-test coverage of the whole suite, for identical coverage
(
history-collectwith a coverage artifact); - mutation results of targeted runs, for
mergeandretire(suite-health.md).
- The audit runs in the closed core (operation
audit, free scope). - To confirm a proposal: the role Manager of the organisation.
Run the audit
- Start the operation
auditon the Work page of the project (or on a schedule, or locally withfistron audit), with the CI history. It reads the repository’s settingssuite-health(the decisions) andquarantinefrom Fistron (Repository settings); a repository whose settings are not set in Fistron yet still gives its files.fistron/suite-health.tomland.fistron/quarantine.toml. - Open the record of kind
suite_healthunder Documents. Its view shows the tests audited, the notes, the recommendations and the decided ones.
Read the recommendations
| Action | Reason | When |
|---|---|---|
review |
identical_coverage |
another test executes exactly the same lines; the fastest of the group is kept |
review |
slow_without_unique_coverage |
among the slowest tests, executing no line of its own (at most 10 by default) |
merge |
same_detected_mutants |
identical coverage, and targeted runs show the group killing the same mutants |
retire |
no_unique_detection |
a slow test whose targeted runs show the rest of the suite detects everything it does |
quarantine |
chronically_flaky |
enough flaky events; handed to the flaky quarantine (Handle flaky tests and quarantine) |
A test that failed in the window outside a flaky event detected something and is never recommended for review, merge or retire.
End-to-end scenarios
A Gherkin suite run against a deployed product has neither per-test coverage nor mutation results. With its suite map (Map your suite and plan the missing tests) the audit reviews its scenarios instead:
| Reason | When |
|---|---|
checks_nothing |
no Then step, or none whose step definition asserts anything |
same_steps |
the same steps as a faster scenario, which is kept |
slow_without_own_function |
among the slowest, and every function it reaches another scenario reaches too |
no_detection_in_window |
at least 50 runs in 180 days and no failure the RCA found to be the product’s |
A scenario whose failure an RCA found to be the product’s, one with a failure no RCA explains and a flaky one are never listed.
- Run the audit with the suite map: the quality audit does it when
you give it the map’s configuration (Audit the quality of your tests and CI),
or locally
fistron audit --history <history> --suite-map <suite-map.json> --rca <cases>with the directory of the window’s RCA reports. - Optional: let a model read each listed scenario. Run
suite-health-opinionswith the record and the map (rolereviewerunder the project’s Models). It says what the scenario verifies and whether that matters for its functions, labelled model; it recommends nothing. - Open the project’s Test plan: Scenarios to review lists them
with the rule’s reason, the evidence and the model’s opinion, beside the
plan of the missing tests. Decide them in the setting
suite-healthas any other test (propose-suite-health).
Propose and decide
-
Start the operation
propose-suite-healthwith the record, the repository and the owner of the entries (from Work, or Operations in the local UI). Fistron adds an[[accepted]]entry per new recommendation to the repository’s settingsuite-healthand keeps the change as a proposal; nothing goes to the repository. -
A manager opens Repository settings (in the local UI also Proposals) and, under Proposed changes, decides it:
- Confirm: the entries are kept; the team changes the tests in its own pull requests;
- Reject, with a Note: nothing changes.
To keep one test out for good, confirm, then turn its entry into
[[rejected]]with a reason in the setting: it is not recommended again.
quarantine recommendations are proposed to the setting quarantine
instead (Handle flaky tests and quarantine).
Troubleshooting
| You see | Cause and fix |
|---|---|
| No recommendation at all, and a note about the decisions | Invalid decisions stop every recommendation. Open the setting suite-health on Repository settings: the text is checked when you save it. A file still in the repository: fistron suite-health check .fistron/suite-health.toml. |
| No identical-coverage review | The history has no per-test coverage (schema 1): collect it with a coverage artifact. |
No merge or retire, a note counts groups without targeted runs |
Run targeted mutation runs and add them to the history (suite-health.md). |
| A note names a job without a coverage map | That job had no readable coverage report in the window. |
| No scenario listed, the record’s schema is 1 or 2 | The audit ran without a suite map: give it one. |
| Every scenario with a failure is missing from the list | The window has no RCA reports: a failure nobody analysed may be a detection. Give --rca the cases’ directory. |
suite-health-opinions says there is no model for the role reviewer |
Set a model for the role reviewer under Models; without it the list has the rules’ text alone. |
| A test you decided keeps coming back | Each test has at most one decision per action; check the entry’s job and test match the history’s names. |
Details: suite-health.md.