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_time
Time when testing started (for duration calculation)
min_time
Minimum test duration to display timing information
col_config
List of column configuration for report formatting
format_column()
Format a column with specified padding and width
ProgressMutationReporter$format_column(text, col_name, colorize = NULL)
text
Text to format
col_name
Column name to use configuration from
colorize
Optional 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)
status
Status symbol (e.g., tick or cross)
k
Number of killed mutations
s
Number of survived mutations
e
Number of errors
t
Total number of mutations
score
Score percentage
mutator
The mutator used
file
The file being tested
Formatted row string
new()
Initialize a new progress reporter
ProgressMutationReporter$new( test_reporter = "silent", min_time = 1, file = stdout() )
test_reporter
Reporter to use for testthat::test_dir
min_time
Minimum time to show elapsed time (default: 1s)
file
Output destination (default: stdout)
start_reporter()
Start reporter
ProgressMutationReporter$start_reporter(plan = NULL)
plan
The complete mutation plan
add_result()
Add a mutation test result
ProgressMutationReporter$add_result(plan, killed, survived, errors)
plan
Current testing plan. See plan()
.
killed
Whether the mutation was killed by tests
survived
Number of survived mutations
errors
Number of errors encountered
update()
Update status spinner (for long-running operations)
ProgressMutationReporter$update(force = FALSE)
force
Force 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)
deep
Whether 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.