Expectations

expect_lt() expect_lte() expect_gt() expect_gte()

Expectation: is returned value less or greater than specified value?

expect_equal() expect_setequal() expect_equivalent() expect_identical() expect_reference()

Expectation: is the object equal to a value?

expect()

The building block of all expect_ functions

expect_cpp_tests_pass()

Test Compiled Code in a Package

expect_known_output() expect_known_value() expect_known_hash()

Expectations: is the output or the value equal to a known good value?

expect_length()

Expectation: does a vector have the specified length?

expect_match()

Expectation: does string match a regular expression?

expect_named()

Expectation: does object have names?

expect_null() expect_type() expect_is() expect_s3_class() expect_s4_class()

Expectation: does the object inherit from a S3 or S4 class, or a base type?

expect_true() expect_false()

Expectation: is the object true/false?

expect_output() expect_error() expect_condition() expect_message() expect_warning() expect_silent()

Expectation: does code produce output/message/warning/error?

skip() skip_if_not() skip_if() skip_if_not_installed() skip_if_offline() skip_on_cran() skip_on_os() skip_on_travis() skip_on_appveyor() skip_on_bioc() skip_if_translated()

Skip a test.

fail() succeed()

Default expectations that alway succeed or fail.

Run tests

test_dir() test_package() test_check() is_testing() testing_package()

Run all tests in directory or package

test_examples() test_example() test_rd()

Test package examples

test_file()

Run all tests in specified file.

test_path()

Locate file in testing directory.

test_that()

Create a test.

auto_test()

Watches code and tests for changes, rerunning tests as appropriate.

auto_test_package()

Watches a package for changes, rerunning tests as appropriate.

context()

Describe the context of a set of tests.

describe()

describe: a BDD testing language

teardown() setup()

Run code on setup/teardown

use_catch()

Use Catch for C++ Unit Testing

Reporters

CheckReporter

Check reporter: 13 line summary of problems

DebugReporter

Test reporter: start recovery.

FailReporter

Test reporter: fail at end.

JunitReporter

Test reporter: summary of errors in jUnit XML format.

ListReporter

List reporter: gather all test results along with elapsed time and file information.

LocationReporter

Test reporter: location

MinimalReporter

Test reporter: minimal.

MultiReporter

Multi reporter: combine several reporters in one.

ProgressReporter

Test reporter: interactive progress bar of errors.

RstudioReporter

Test reporter: RStudio

SilentReporter

Test reporter: gather all errors silently.

StopReporter

Test reporter: stop on error.

SummaryReporter

Test reporter: summary of errors.

TapReporter

Test reporter: TAP format.

TeamcityReporter

Test reporter: Teamcity format.