| ProgressMutationReporter | R Documentation |
A reporter that displays a progress indicator for mutation tests. It provides real-time feedback on which mutants are being tested and whether they were killed by tests.
muttest::MutationReporter -> ProgressMutationReporter
start_timeTime when testing started (for duration calculation)
min_timeMinimum test duration to display timing information
col_configList of column configuration for report formatting
format_column()Format a column with specified padding and width
ProgressMutationReporter$format_column(text, col_name, colorize = NULL)
textText to format
col_nameColumn name to use configuration from
colorizeOptional function to color the text
fmt_h()Format the header of the report
ProgressMutationReporter$fmt_h()
fmt_r()Format a row of the report
ProgressMutationReporter$fmt_r(status, k, s, e, t, score, mutator, file)
statusStatus symbol (e.g., tick or cross)
kNumber of killed mutations
sNumber of survived mutations
eNumber of errors
tTotal number of mutations
scoreScore percentage
mutatorThe mutator used
fileThe file being tested
Formatted row string
new()Initialize a new progress reporter
ProgressMutationReporter$new( test_reporter = "silent", min_time = 1, file = stdout() )
test_reporterReporter to use for testthat::test_dir
min_timeMinimum time to show elapsed time (default: 1s)
fileOutput destination (default: stdout)
start_reporter()Start reporter
ProgressMutationReporter$start_reporter(plan = NULL)
planThe complete mutation plan
add_result()Add a mutation test result
ProgressMutationReporter$add_result(plan, killed, survived, errors)
planCurrent testing plan. See plan().
killedWhether the mutation was killed by tests
survivedNumber of survived mutations
errorsNumber of errors encountered
update()Update status spinner (for long-running operations)
ProgressMutationReporter$update(force = FALSE)
forceForce update even if interval hasn't elapsed
end_file()End testing current file
ProgressMutationReporter$end_file()
cr()Carriage return if dynamic, newline otherwise
ProgressMutationReporter$cr()
end_reporter()End reporter with detailed summary
ProgressMutationReporter$end_reporter()
clone()The objects of this class are cloneable with this method.
ProgressMutationReporter$clone(deep = FALSE)
deepWhether to make a deep clone.
Other MutationReporter:
MutationReporter,
default_reporter()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.