Skip to contents

Core

Run mutation tests and define test plans.

muttest()
Run a mutation test
muttest_plan()
Create a plan for mutation testing

Mutators

Individual mutators — each defines one kind of code change.

Mutator
Mutator
operator()
Mutate a binary operator
boolean_literal()
Mutate a boolean literal
na_literal()
Mutate an NA or NULL literal
call_name()
Mutate a function call name
string_empty()
Mutate non-empty string literals to the empty string
string_fill()
Mutate the empty string literal to a placeholder string
numeric_increment()
Increment numeric literals
numeric_decrement()
Decrement numeric literals
index_increment()
Increment subscript indices
index_decrement()
Decrement subscript indices
negate_condition()
Negate the condition of if/while statements
remove_condition_negation()
Remove negation from the condition of if/while statements
remove_negation()
Remove logical negation
replace_return_value()
Replace the value in explicit return() calls
delete_statement()
Delete statements one at a time

Mutator presets

Ready-made collections of related mutators for common bug categories.

arithmetic_operators()
Arithmetic operator mutators
comparison_operators()
Comparison operator mutators
logical_operators()
Logical operator mutators
boolean_literals()
Boolean literal mutators
na_literals()
NA and NULL literal mutators
numeric_literals()
Numeric literal mutators
index_mutations()
Index mutation mutators
string_literals()
String literal mutators
condition_mutations()
Condition mutation mutators

Reporters

Control how results are displayed.

MutationReporter
Reporter for Mutation Testing
ProgressMutationReporter
Progress Reporter for Mutation Testing
default_reporter()
Create a default reporter

Strategies

Control how tests are run and source files are copied.

TestStrategy
TestStrategy interface
FileTestStrategy
Run tests matching the mutated source file name
FullTestStrategy
Run all tests for a mutant
CopyStrategy
CopyStrategy interface
PackageCopyStrategy
Package copy strategy
default_test_strategy()
Create a default run strategy
default_copy_strategy()
Create a default project copy strategy