Report files
Besides what it prints, a run writes its results as files, for tools and for reading later: a
report viewer, a dashboard, a badge, a code-quality plugin. Every run writes them except a run of
one mutant (--only, and so verify and explain), which says nothing about the rest. The
summary’s Reports line lists the files it wrote.
Formats
Section titled “Formats”| Kind | File | What it is |
|---|---|---|
json | mutation.json | The open mutation-testing report schema, version 2, which report viewers, dashboards and badges read. |
html | mutation.html | The same report in the schema’s own viewer. Everything is in the one file, so it opens from disk with no network. |
xml | mutations.xml | The mutations.xml format that many build-server and code-quality plugins read. |
json and html are written unless you choose otherwise.
Where they go
Section titled “Where they go”| Build | Directory |
|---|---|
| Gradle | build/mutastic/, or build/mutastic/<module>/ for a module (:data → build/mutastic/data/) |
| Maven | the module’s own target/mutastic/ |
The same goes for a run from the command line and from either build plugin. A file given a path of its own goes there instead, relative to the project’s directory.
Choosing which
Section titled “Choosing which”--report=KIND[:PATH] names one report. Given at all, it replaces the defaults, so name each one
you want; it can be given more than once.
--report=xmlwrites onlymutations.xml.--report=json --report=xmlwritesmutation.jsonandmutations.xml.--report=json:reports/mutation.jsonwrites the JSON report toreports/mutation.json.--report=nonewrites nothing.
From a build plugin, reports takes the same values as a list, on the command line or in the
build file:
./gradlew mutasticRun -Pmutastic.reports=json,xmlmutastic { reports = listOf("json", "xml")}mvn mutastic:run -Dmutastic.reports=json,xml<configuration> <reports> <report>json</report> <report>xml</report> </reports></configuration>mutastic run --report=json --report=xmlA list on the command line replaces the build file’s. See --report
for the option itself.