Juggernaut.Report.Overview (Juggernaut v0.4.0)

Copy Markdown View Source

The overview page's data (design notes §11): the recorded verdict, each gate rule with the recorded score it was judged on and whether the run's recorded failures name it, the counts and kill kinds, the survivors with the new ones first, the mutants killed only by integration tests, new ignores, triage claims, reuse and the wall time.

A rule is shown as failed exactly when the run's summary lists a failure for it; the page never re-judges the gate. The run records thresholds only with its failures, so a threshold taken from today's configuration instead is marked :configured.

Summary

Functions

The overview of run; new_keys from new_survivor_keys/3.

The mutants of run killed only by integration tests (Juggernaut.View.integration_only/2: they count as killed), each with its killing test's id.

Kill kind counts as [%{kind, count}] in Juggernaut.Result.kill_kinds/0 order.

The keys of run's survivors that previous did not list as survivors, or nil when there is no previous run to compare with. Mutants pair by canonical key.

The gate rules of run, in order: the core rule (when the run has core mutants or a core failure), the changed rule per non-core file or for the whole run, then every no_coverage and incomplete failure. Each has the recorded score, a threshold, its threshold_basis and passed.

The survivors of run (Juggernaut.View.survivors/2), new ones first (core first within each group), each with new as in Juggernaut.Report.Data.mutant/5.

The thresholds the overview shows: for :core and :changed the one a recorded failure of that rule names, else the one in configured; for :per how the recorded changed failures were judged, else configured[:per]. Each is %{value, basis} with basis :recorded or :configured.

Functions

build(run, new_keys, options)

@spec build(Juggernaut.Run.t(), MapSet.t() | nil, Juggernaut.View.options()) :: map()

The overview of run; new_keys from new_survivor_keys/3.

integration_only(run, options)

@spec integration_only(Juggernaut.Run.t(), Juggernaut.View.options()) :: [map()]

The mutants of run killed only by integration tests (Juggernaut.View.integration_only/2: they count as killed), each with its killing test's id.

kill_kinds(counts)

@spec kill_kinds(map()) :: [%{kind: atom(), count: non_neg_integer()}]

Kill kind counts as [%{kind, count}] in Juggernaut.Result.kill_kinds/0 order.

new_survivor_keys(run, previous, options)

@spec new_survivor_keys(
  Juggernaut.Run.t(),
  Juggernaut.Run.t() | nil,
  Juggernaut.View.options()
) ::
  MapSet.t() | nil

The keys of run's survivors that previous did not list as survivors, or nil when there is no previous run to compare with. Mutants pair by canonical key.

rules(run, configured)

@spec rules(Juggernaut.Run.t(), keyword()) :: [map()]

The gate rules of run, in order: the core rule (when the run has core mutants or a core failure), the changed rule per non-core file or for the whole run, then every no_coverage and incomplete failure. Each has the recorded score, a threshold, its threshold_basis and passed.

A rule is failed exactly when the run's summary lists a failure for it, and the page never re-judges. The run records thresholds only with its failures, so a failed rule shows the threshold it was judged against (threshold_basis: :recorded). A passing rule takes the threshold a failure of the same rule recorded when there is one, and otherwise the one in configured (today's .juggernaut.exs), with threshold_basis: :configured. Whether the changed rule is per file or per run follows the recorded changed failures, and configured[:per] only when there are none.

survivors(run, new_keys, options)

@spec survivors(Juggernaut.Run.t(), MapSet.t() | nil, Juggernaut.View.options()) :: [
  map()
]

The survivors of run (Juggernaut.View.survivors/2), new ones first (core first within each group), each with new as in Juggernaut.Report.Data.mutant/5.

thresholds(run, configured)

@spec thresholds(Juggernaut.Run.t(), keyword()) :: %{
  required(atom()) => %{value: term(), basis: atom()}
}

The thresholds the overview shows: for :core and :changed the one a recorded failure of that rule names, else the one in configured; for :per how the recorded changed failures were judged, else configured[:per]. Each is %{value, basis} with basis :recorded or :configured.