Mutare.Report.Json (mutare v0.1.0)

Copy Markdown View Source

Renders a mutation run as a mutation-testing-elements report-schema JSON document (the schema Stryker and its viewer/dashboard speak).

This is the lossless machine format: every mutant (not just survivors) is emitted, keyed by file, with its location and status. Mutare's Mutare.Result statuses map exactly onto the schema's MutantStatus vocabulary (see status/1), so the report drops straight into the existing ecosystem — Mutare.Report.Html embeds this same document into the report web component, and it can be uploaded to the Stryker dashboard unchanged.

Emitted by mix mutare --report json or mix mutare --report json:path.json.

Summary

Functions

Render results and their original sources as a report-schema JSON string.

Functions

render(results, sources, opts \\ [])

@spec render([Mutare.Result.t()], %{optional(String.t()) => String.t()}, keyword()) ::
  String.t()

Render results and their original sources as a report-schema JSON string.

opts[:min_score] (when set) becomes the report's score thresholds.