Package: covtracer 0.0.1

Doug Kelkhoff

covtracer: Contextualizing Tests

Dissects a package environment or 'covr' coverage object in order to cross reference tested code with the lines that are evaluated, as well as linking those evaluated lines to the documentation that they are described within. Connecting these three pieces of information provides a mechanism of linking tests to documented behaviors.

Authors:Doug Kelkhoff [cre, aut], Szymon Maksymiuk [aut], Andrew McNeil [aut], F. Hoffmann-La Roche AG [cph, fnd]

covtracer_0.0.1.tar.gz
covtracer_0.0.1.zip(r-4.5)covtracer_0.0.1.zip(r-4.4)covtracer_0.0.1.zip(r-4.3)
covtracer_0.0.1.tgz(r-4.4-any)covtracer_0.0.1.tgz(r-4.3-any)
covtracer_0.0.1.tar.gz(r-4.5-noble)covtracer_0.0.1.tar.gz(r-4.4-noble)
covtracer_0.0.1.tgz(r-4.4-emscripten)covtracer_0.0.1.tgz(r-4.3-emscripten)
covtracer.pdf |covtracer.html
covtracer/json (API)
NEWS

# Install 'covtracer' in R:
install.packages('covtracer', repos = c('https://pharmaverse.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/genentech/covtracer/issues

On CRAN:

6.58 score 21 stars 10 scripts 501 downloads 10 exports 0 dependencies

Last updated 5 months agofrom:b8cc02b683. Checks:OK: 7. Indexed: no.

TargetResultDate
Doc / VignettesOKDec 07 2024
R-4.5-winOKDec 07 2024
R-4.5-linuxOKDec 07 2024
R-4.4-winOKDec 07 2024
R-4.4-macOKDec 07 2024
R-4.3-winOKDec 07 2024
R-4.3-macOKDec 07 2024

Exports:join_on_containing_srcrefspkg_srcrefspkg_srcrefs_dfRd_dftest_srcrefstest_srcrefs_dftest_trace_dftest_trace_mappingtrace_srcrefstrace_srcrefs_df

Dependencies:

Combining srcref Data

Rendered fromcombining_srcref_data.Rmdusingknitr::rmarkdownon Dec 07 2024.

Last update: 2024-07-10
Started: 2021-09-03

Plotting Test Paths

Rendered fromplotting_test_paths.Rmdusingknitr::rmarkdownon Dec 07 2024.

Last update: 2024-07-10
Started: 2022-03-01

Working with srcrefs

Rendered fromworking_with_srcrefs.Rmdusingknitr::rmarkdownon Dec 07 2024.

Last update: 2024-07-10
Started: 2021-09-03

Readme and manuals

Help Manual

Help pageTopics
Create an S3 list of srcref objectsas_list_of_srcref as_list_of_srcref.environment as_list_of_srcref.list
Wrap object in test description derivation dataas_testthat_desc as_test_desc
Coerce a list_of_srcref object to a data.frameas.data.frame.list_of_srcref
A simple alternative to 'devtools::as.package'as.package
Check that the coverage object retains testing informationcoverage_check_has_recorded_tests
Retrieve test traces from a coverage objectcoverage_get_tests
Test that the coverage object retains testing informationcoverage_has_recorded_tests
Convert an expression, call or symbol to a single-line stringexpr_str
Map 'srcrefs' over an iterable object, Filtering non-srcref resultsflat_map_srcrefs
Format a list_of_srcref objectformat.list_of_srcref
Get namespace exports, filtering methods tables and definitionsget_namespace_object_names
Get the full path to the srcref filegetSrcFilepath
Test whether an object is a 'srcref' objectis_srcref
Join srcref data.frames by intersection of srcref spansjoin_on_containing_srcrefs
Match srcrefs against srcrefs that contain themmatch_containing_srcrefs
Build an empty covr-style test trace mappingnew_empty_test_trace_tally
Get namespace export namespace nameobj_namespace_name
Verify that the package collection contains srcref informationpackage_check_has_keep_source
Extract all the srcref objects of objects within a package namespacepkg_srcrefs pkg_srcrefs.character pkg_srcrefs.coverage pkg_srcrefs.environment
Create a data.frame of package srcref objectspkg_srcrefs_df
Create a tabular representation of man file informationRd_df
Parse the expression associated with a srcrefsrcref_expr
Convert a srcref into a stringsrcref_str
Retrieve 'srcref'ssrcrefs srcrefs.default srcrefs.environment srcrefs.list srcrefs.MethodDefinition srcrefs.namespace srcrefs.nonstandardGenericFunction srcrefs.R6ClassGenerator srcrefs.standardGeneric
Parse a test description from the calling expressiontest_description
Parse the test description from a 'test_that' calltest_description_test_that
Parse the test description from a 'describe' calltest_description_test_that_describe
Parse the test description from a 'it' calltest_description_test_that_describe_it
Extract test srcref objectstest_srcrefs test_srcrefs.coverage
Create a data.frame of coverage test srcref objectstest_srcrefs_df
Build a traceability matrix that links documented behaviors to unit teststest_trace_df test_trace_df.coverage
Create a data.frame mapping tests to coverage tracestest_trace_mapping
Extract srcref objects from coverage object tracestrace_srcrefs trace_srcrefs.coverage
Create a data.frame of coverage trace srcref objectstrace_srcrefs_df
For consistency, stub calls with srcref-like attributeswith_pseudo_srcref