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.htmlbecomes the report body.- Package pages, annotated source files and
style.cssupload 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/.