Skip to content

feat: perch coverage says what test to add - #348

Closed
jbrown9513 wants to merge 1 commit into
fix/coverage-reachfrom
feat/coverage-report-redesign
Closed

jbrown9513 wants to merge 1 commit into
fix/coverage-reachfrom
feat/coverage-report-redesign

Conversation

@jbrown9513

Copy link
Copy Markdown
Contributor

The report listed mutants where a reader acts on methods. The summary and each file's page were one row per survived mutant, so a method with five edits on one line was five rows, and on perch the graph.js page put 613 rows before its code. Every note under a line repeated the same eight test names, which is most of why the page was 53 MB. Scores had no thresholds, the file table was flat and alphabetical, the test table was 47 rows of 100%, and the only call to action was behind a Copy prompt button. The terminal printed the same things in the same order.

The unit is now the method, and each one says what test to add.

  • Where to add tests. The summary, the file page and the terminal rank the methods with survived mutants, most first, with the score, how many tests reach it, and one sentence from the surest survived mutant: Add a test at the boundary of \>=` on line 12, where `>=` and `>` give different results. The sentence is fixed wording per kind of edit around the report's own facts (src/coverage-advice.js`); the mutants fold out under the row, and one Copy prompt covers all of them. The terminal prints the sentence whole on its own line and wraps it rather than cut it.
  • Code first. A file's page opens on its numbers, its methods to test, a toolbar, then the code. Each line with survivors has a mark in the gutter with their count; pressing it opens that line's note with each edit, the line both ways, and the buttons. Next and previous survived step through them; a switch opens every note. The method bar above the code carries the sentence too.
  • A tree. Source files are directories with their files' numbers summed, worst first at every level, folding, with Killed, Survived and No coverage beside the score, as Stryker lays them out. A chain of directories holding nothing but the next is one row. Past two hundred files the tree opens on its top level.
  • Thresholds. Scores are red under 60, amber to 80 and green from there, Stryker's defaults, in the tiles, the tree and every bar.
  • Only what needs fixing. The test table lists the files with a duplicate, a test that checks nothing, or a live service; the rest are a count and a button. The terminal says 46 test files have nothing to fix.
  • Gone. The Risk column, the per-file Problems table, and the list of passing tests under every mutant: a survived mutant is one none of its tests kills, so that list was always every test the bar above already names. The bar names the eight nearest, the ones perch asked.

On perch the page goes from 53 MB to 33 MB. --all on the terminal lists every method and every survived mutant with the id perch close takes; without it the count line says so.

Closes #346

… what to add

The summary, each file's page and the terminal listed one row per survived mutant, with the same eight test names under every one, and the code came after the rows. They now rank methods with survived mutants, most first, each with a sentence from its surest mutant saying what a new test has to tell apart, and the mutants fold under the row. A file's page shows its code first with a count in the gutter where mutants survived, one note open at a time, and next and previous survived. Source files are a tree worst first with scores coloured against 60 and 80 as Stryker colours them; test files are listed only when something needs fixing.
@jbrown9513

Copy link
Copy Markdown
Contributor Author

Stacked on #345, which it is based on; merge that first, then this one retargets to main.

@perchcode-bot

perchcode-bot Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Perch Scan: no issues in 137 methods at 44c73ee.

See the scan

@jbrown9513

Copy link
Copy Markdown
Contributor Author

Folded into #355.

@jbrown9513 jbrown9513 closed this Oct 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant