| JSONMutationReporter | R Documentation |
A quiet reporter that writes a machine-readable JSON artifact. It prints
nothing while running; on completion it writes one JSON file describing every
mutant, keyed by source file. The JSON is the data contract consumed by
dashboards, CI job summaries, and the HTML report (see
report()).
Combine it with ProgressMutationReporter via MultiReporter to get a live console display and a JSON file from the same run.
muttest::MutationReporter -> JSONMutationReporter
pathPath of the JSON file to write.
mutants_by_filePer-file lists of mutant records.
sourcesPer-file original source lines.
muttest::MutationReporter$cat_line()muttest::MutationReporter$end_file()muttest::MutationReporter$end_mutator()muttest::MutationReporter$get_score()muttest::MutationReporter$rule()muttest::MutationReporter$start_file()muttest::MutationReporter$start_mutator()muttest::MutationReporter$update()new()Initialize a new JSON reporter
JSONMutationReporter$new(path = "muttest.json", ...)
pathPath of the JSON file to write (default: "muttest.json").
...Passed to the MutationReporter constructor.
start_reporter()Start reporter
JSONMutationReporter$start_reporter(plan = NULL)
planThe complete mutation plan
add_result()Add a mutation test result
JSONMutationReporter$add_result( plan, killed, survived, no_coverage, 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
no_coverageNumber of mutants with no test coverage
errorsNumber of errors encountered
errorOptional error condition from a failed run
original_codeOriginal source lines before mutation
mutated_codeMutated source lines
end_reporter()End reporter, then write the JSON file
JSONMutationReporter$end_reporter()
clone()The objects of this class are cloneable with this method.
JSONMutationReporter$clone(deep = FALSE)
deepWhether to make a deep clone.
Other MutationReporter:
MultiReporter,
MutationReporter,
ProgressMutationReporter,
default_reporter()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.