| autotest_package | R Documentation |
Automatically test an entire package by tracing calls made in its documented examples (and, for local source packages, its test suite) with typetracer, then testing each traced function call in turn.
autotest_package(
package = ".",
functions = NULL,
exclude = NULL,
test = FALSE,
test_data = NULL,
progress = c("bar", "tests", "none")
)
package |
Name of package, as either
|
functions |
Optional character vector containing names of functions of nominated package to be included in 'autotesting'. |
exclude |
Optional character vector containing names of any functions of nominated package to be excluded from 'autotesting'. |
test |
If |
test_data |
Result returned from calling either autotest_types or
autotest_package with |
progress |
Style of progress display while testing functions, one of:
|
An autotest_package object which is derived from a tibble
tbl_df object. This has one row for each test, and the following eight
columns:
type The type of result, either "dummy" for test = FALSE, or one
of "error", "warning", "diagnostic", or "message".
test_name Name of each test
fn_name Name of function being tested
parameter Name of parameter being tested
parameter_type Expected type of parameter as identified by
autotest.
operation Description of the test
content For test = FALSE, the expected behaviour of the
test; for test = TRUE, the observed discrepancy with that expected
behaviour
test If FALSE (default), list all tests without
implementing them, otherwise implement all tests.
Some columns may contain NA values, as explained in the Note.
Some columns may contain NA values, including:
parameer and parameter_type, for tests applied to entire
functions, such as tests of return values.
test_name for warnings or errors generated through "normal"
function calls generated directly from example code, in which case type
will be "warning" or "error", and content will contain the content of
the corresponding message.
Other main_functions:
autotest_types()
x <- autotest_package (package = "stats", functions = "var", test = FALSE)
x
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.