Skip to main content

Module mutation

Module mutation 

Source
Expand description

The dynamic half of mutation testing: the runner protocol, the embedded companion, the transport, the scheduler and the result model.

The static half (selection, the test map, pruning, ranking and the instrumented code) is fallow_engine::mutation. The entry points are crate::run_mutation and crate::plan_mutation.

Structs§

MutationRunOptions
Options of crate::run_mutation and crate::plan_mutation.

Enums§

MutationProgress
A phase event of a mutation run, for a caller that shows progress.
MutationRunScope
The code that a mutation run mutates.
Operator
One mutation operator.

Constants§

MAX_VERDICT_INPUT_BYTES
The largest verdict document that the join reads.

Functions§

apply_mutation_verdicts
Applies a verdict document to report.
baseline_blocked_run_error
The error of a run in which no mutant got a test result while tests failed with no active mutant.
last_mutation_report_path
The path of the saved report of the last run of the project.
remove_finished_mutation_journal
Removes the outcome journal of the project when report is complete, and returns true when it removed a journal. Call it after the report is saved: the saved report then holds each result. A partial or failed run keeps the journal, so --resume can continue it. A run that started no test runner (runner is absent) did not write or check the journal, so the journal can belong to an interrupted run of another scope, and it stays.
save_last_mutation_report
Saves the JSON report of a run as the last report of the project, and returns its path. The write goes to a temporary file first, so a reader never sees half a report.
split_control_run_failure
Splits the message of a control-run baseline failure into its fixed reason and the test error after it. Gives None for another message or for a reason with no test error.
validate_mutation_verdicts
Checks a verdict document without a report.

Type Aliases§

MutationProgressSink
Receives the MutationProgress events of a run. The scheduler sends the mutant events from its worker threads.