| MutationReporter | R Documentation |
The job of a mutation reporter is to aggregate and display the results of mutation tests. It tracks each mutation attempt, reporting on whether the tests killed the mutation or the mutation survived.
test_reporterReporter to use for the testthat::test_dir function
outOutput destination for reporter messages
widthWidth of the console in characters
unicodeWhether Unicode output is supported
crayonWhether colored output is supported
rstudioWhether running in RStudio
hyperlinksWhether terminal hyperlinks are supported
current_filePath of the file currently being mutated
current_mutatorMutator currently being applied
planComplete mutation plan for the test run
resultsList of mutation test results, indexed by file path
current_scoreCurrent score of the mutation tests
error_messagesList of error messages from failed mutant runs
new()Initialize a new reporter
MutationReporter$new(test_reporter = "silent", file = stdout())
test_reporterReporter to use for the testthat::test_dir function
fileOutput destination (default: stdout)
start_reporter()Start reporter
MutationReporter$start_reporter(plan = NULL)
planThe complete mutation plan
temp_dirPath to the temporary directory for testing
start_file()Start testing a file
MutationReporter$start_file(filename)
filenamePath to the file being mutated
start_mutator()Start testing with a specific mutator
MutationReporter$start_mutator(mutator)
mutatorThe mutator being applied
add_result()Add a mutation test result
MutationReporter$add_result( plan, killed, survived, errors, error = NULL, original_code = NULL, mutated_code = NULL )
planCurrent testing plan. See muttest_plan().
killedWhether the mutation was killed by tests
survivedNumber of survived mutations
errorsNumber of errors encountered
errorOptional error condition from a failed run
original_codeOriginal source lines before mutation
mutated_codeMutated source lines
update()Update status (no-op in base class)
MutationReporter$update(force = FALSE)
forceIgnored
end_mutator()End testing with current mutator
MutationReporter$end_mutator()
end_file()End testing current file
MutationReporter$end_file()
end_reporter()End reporter and show summary
MutationReporter$end_reporter()
get_score()Get the current score
MutationReporter$get_score()
cat_tight()Print a message to the output
MutationReporter$cat_tight(...)
...Message to print
cat_line()Print a message to the output
MutationReporter$cat_line(...)
...Message to print
rule()Print a message to the output with a rule
MutationReporter$rule(...)
...Message to print
clone()The objects of this class are cloneable with this method.
MutationReporter$clone(deep = FALSE)
deepWhether to make a deep clone.
Other MutationReporter:
ProgressMutationReporter,
default_reporter()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.