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§

MutationReplayOptions
Options of crate::replay_mutation: one export called on the original and on one mutant.
MutationRunOptions
Options of crate::run_mutation and crate::plan_mutation.
MutationWitnessStore
The cached witnesses of a project, read once for a tasks batch.

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.
RecordArgsMode
How a run records the arguments of the changed exported functions in its dry run. The values stay in the gitignored cache directory.

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.
mutation_witness_store
The cached witnesses of the project of analysis. None when the config cannot load.
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. The journal is removed only when this run wrote it: a newer run of the project can own the journal file by now.
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 baseline failure from a control run or from the dry run of a restarted companion 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.