test_trace_mapping {covtracer} | R Documentation |
Create a data.frame mapping tests to coverage traces
Description
Extract a matrix used to relate test code to the traces that each test evaluates.
Usage
test_trace_mapping(x)
Arguments
x |
A |
Value
A data.frame
with one record for each line of code executed, with
variables:
- test
The index of the test that was executed, reflecting the order in which tests are executed
- depth
The call stack depth when the coverage trace was evaluated
- i
The index of the expression evaluated by each test. This can be used to recover an order of trace execution for a given test index
- trace
The index of the coverage trace that was evaluated
See Also
srcrefs_df srcrefs
Examples
options(covr.record_tests = TRUE)
pkg_path <- system.file("examplepkg", package = "covtracer")
cov <- covr::package_coverage(pkg_path)
test_trace_mapping(cov)
[Package covtracer version 0.0.1 Index]