What one job's result says about its mutant (design notes §10.7): a status and, for a kill, its kind and the killing test.
The table below is golden-tested (test/golden/status_table.md); each row is one
input shape, first match wins.
| Job result | Status | Kill kind |
|---|---|---|
| ran, every test passed | survived | |
ran, first failure ExUnit.AssertionError | killed | assertion |
ran, first failure ExUnit.TimeoutError | killed | timeout |
ran, first failure a linked process's exit ({:EXIT, pid}) | killed | crash |
| ran, first failure another exception, a throw or an exit | killed | exception |
ran, setup_all failed (the test is invalid) | killed | exception |
| past the job deadline (worker recycled) | killed | timeout |
worker died with the mutant on (System.halt/1, VM abort) | killed | crash |
| harness error (raised outside the tests, count mismatch) | harness_error | |
| boot lane: app did not start, or test files did not load | killed | boot |
| boot lane: worker died while starting with the mutant on | killed | crash |
| boot lane: worker hung while starting with the mutant on | killed | timeout |
| boot lane: the suite ran | as a job result | |
| boot lane: failed before the mutant was on | harness_error |
A job result is the map Juggernaut.Pool.Worker.run/3 answers; a boot-lane outcome is
Juggernaut.Runner.BootLane.run/2's. The killing test is the first test reported
failed. A worker that dies running a job with every mutant off (a control) is not
classified here: the runner (Juggernaut.Runner) treats it as a failed control.
Summary
Functions
The status of a mutant from its boot-lane outcome (see the module doc).
The status of a mutant from its job's result (see the module doc).
The kill kind of a failed test's outcome (Juggernaut.Peer.Formatter.outcome/1).
Types
@type t() :: %{ status: Juggernaut.Result.status(), kill_kind: Juggernaut.Result.kill_kind() | nil, killed_by: test_id() | nil, reason: String.t() | nil }
Functions
@spec boot( {:killed, Juggernaut.Result.kill_kind(), String.t()} | {:ran, map()} | {:error, Juggernaut.Error.t()} ) :: t()
The status of a mutant from its boot-lane outcome (see the module doc).
The status of a mutant from its job's result (see the module doc).
@spec kind(map()) :: Juggernaut.Result.kill_kind()
The kill kind of a failed test's outcome (Juggernaut.Peer.Formatter.outcome/1).