Share a PIT mutation report

Line coverage tells you a line ran. Mutation testing tells you whether any assertion would have noticed if the line were wrong — which is why a PIT report is more interesting than a coverage report and read by roughly a tenth as many people.

The reason is mechanical. PIT's output is a directory:

target/pit-reports/
  index.html
  com.example.billing/
    index.html
    Invoice.java.html      # annotated source, surviving mutants highlighted
  style.css

The value is in the drill-down, and the drill-down is exactly what breaks when you email index.html on its own.

Make the path stable, publish the folder

<!-- pom.xml -->
<configuration>
  <timestampedReports>false</timestampedReports>
  <outputFormats><value>HTML</value></outputFormats>
</configuration>
mvn -q test-compile org.pitest:pitest-maven:mutationCoverage

Then drag target/pit-reports/ (or a zip) into the app:

  • index.html becomes the report body.
  • Package pages, annotated source files and style.css upload alongside it with their relative links rewritten to the uploaded copies.
  • Scripts run inside a sandboxed iframe, so the mutant tooltips and the source highlighting behave normally.

For Gradle, the same applies to build/reports/pitest/.

Argue about the mutants, on the mutants

  • Anchored threads on the surviving mutant — "equivalent, this boundary cannot be reached" versus "real, we never assert the rounding". See commenting on HTML.
  • Revisions — one report id per module. A mutation-score drop between two revisions is a fact, not a feeling.
  • Access per report — private, team, domain-gated, or named reviewers. See the sharing model.

Limits

  • Entry HTML: 5 MB. Assets: 25 MB per file, 250 MB and 500 files total — a whole-codebase PIT run generates one annotated source page per class, so a large monolith can hit the file count. Scope the run with targetClasses per module and publish one report per module.
  • 60 requests/minute per token.

Try it

Comma is free — unlimited reports, unlimited commenters, unlimited revision history.

Publish a mutation report →

Related