devtools (version 1.7.0)

test: Execute all test_that tests in a package.

Description

Tests are assumed to be located in either the inst/tests/ or tests/testthat directory (the latter is recommended). See test_dir for the naming convention of test scripts within one of those directories and test_check for the folder structure conventions.

Usage

test(pkg = ".", filter = NULL)

Arguments

pkg
package description, can be path or package name. See as.package for more information
filter
If not NULL, only tests with file names matching this regular expression will be executed. Matching will take on the file name after it has been stripped of "test-" and ".r".

Details

If no testing infrastructure is present, you'll be asked if you want devtools to create it for you (in interactive sessions only). See add_test_infrastructure for more details.