Skip to content
mutastic

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.

KindFileWhat it is
jsonmutation.jsonThe open mutation-testing report schema, version 2, which report viewers, dashboards and badges read.
htmlmutation.htmlThe same report in the schema’s own viewer. Everything is in the one file, so it opens from disk with no network.
xmlmutations.xmlThe mutations.xml format that many build-server and code-quality plugins read.

json and html are written unless you choose otherwise.

BuildDirectory
Gradlebuild/mutastic/, or build/mutastic/<module>/ for a module (:data → build/mutastic/data/)
Maventhe 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.

--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=xml writes only mutations.xml.
  • --report=json --report=xml writes mutation.json and mutations.xml.
  • --report=json:reports/mutation.json writes the JSON report to reports/mutation.json.
  • --report=none writes nothing.

From a build plugin, reports takes the same values as a list, on the command line or in the build file:

Terminal window
./gradlew mutasticRun -Pmutastic.reports=json,xml
build.gradle.kts
mutastic {
reports = listOf("json", "xml")
}

A list on the command line replaces the build file’s. See --report for the option itself.