Automatically test an entire package by converting examples to
and submitting each to the autotest_yaml function.
autotest_package( package = ".", functions = NULL, exclude = NULL, test = FALSE, test_data = NULL, quiet = FALSE )
Name of package, as either
Optional character vector containing names of functions of nominated package to be included in 'autotesting'.
Optional character vector containing names of any functions of nominated package to be excluded from 'autotesting'.
Result returned from calling either autotest_types or
If 'FALSE', provide printed output on screen.
autotest_package object which is derived from a tibble
tbl_df object. This has one row for each test, and the following nine
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
operation Description of the test
test = FALSE, the expected behaviour of the test; for
test = TRUE, the observed discrepancy with that expected behaviour
FALSE (default), list all tests without implementing them,
otherwise implement all tests.
yaml_hash' A unique hash which may be be used to extract the yaml`
specification of each test.
Some columns may contain NA values, as explained in the Note.
Some columns may contain NA values, including:
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
will be "warning" or "error", and
content will contain the content of
the corresponding message.