Learn R Programming

testthat (version 0.6)

test_package: Run all tests in an installed package

Description

Test are run in an environment that inherits from the package environment so that tests can access non-exported functions and variables.

Usage

test_package(package, filter = NULL,
    reporter = "summary")

Arguments

package
package name
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".
reporter
reporter to use

Examples

Run this code
test_package("testthat")

Run the code above in your browser using DataLab