# Unit Testing for R

## Documentation for package ‘testthat’ version 3.0.2

- DESCRIPTION file.
- User guides, package vignettes and other documentation.

## Help Pages

auto_test | Watches code and tests for changes, rerunning tests as appropriate.
auto_test_package | Watches a package for changes, rerunning tests as appropriate.
CheckReporter | Check reporter: 13 line summary of problems
CompactProgressReporter | Test reporter: interactive progress bar of errors.
comparison-expectations | Does code return a number greater/less than the expected value?
DebugReporter | Test reporter: start recovery.
describe | describe: a BDD testing language
equality-expectations | Does code return the expected value?
expect | The building block of all 'expect_' functions
expect_condition | Does code throw an error, warning, message, or other condition?
expect_equal | Does code return the expected value?
expect_error | Does code throw an error, warning, message, or other condition?
expect_false | Does code return 'TRUE' or 'FALSE'?
expect_gt | Does code return a number greater/less than the expected value?
expect_gte | Does code return a number greater/less than the expected value?
expect_identical | Does code return the expected value?
expect_invisible | Does code return a visible or invisible object?
expect_length | Does code return a vector with the specified length?
expect_lt | Does code return a number greater/less than the expected value?
expect_lte | Does code return a number greater/less than the expected value?
expect_mapequal | Does code return a vector containing the expected values?
expect_message | Does code throw an error, warning, message, or other condition?
expect_named | Does code return a vector with (given) names?
expect_output | Does code print output to the console?
expect_s3_class | Does code return an object inheriting from the expected base type, S3 class, or S4 class?
expect_s4_class | Does code return an object inheriting from the expected base type, S3 class, or S4 class?
expect_setequal | Does code return a vector containing the expected values?
expect_silent | Does code execute silently?
expect_snapshot | Snapshot testing
expect_snapshot_error | Snapshot testing
expect_snapshot_file | Snapshot testing for whole files
expect_snapshot_output | Snapshot testing
expect_snapshot_value | Snapshot testing
expect_true | Does code return 'TRUE' or 'FALSE'?
expect_type | Does code return an object inheriting from the expected base type, S3 class, or S4 class?
expect_vector | Does code return a vector with the expected size and/or prototype?
expect_visible | Does code return a visible or invisible object?
expect_warning | Does code throw an error, warning, message, or other condition?
fail | Default expectations that always succeed or fail.
FailReporter | Test reporter: fail at end.
inheritance-expectations | Does code return an object inheriting from the expected base type, S3 class, or S4 class?
is_parallel | Determine testing status
is_testing | Determine testing status
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
logical-expectations | Does code return 'TRUE' or 'FALSE'?
MinimalReporter | Test reporter: minimal.
MultiReporter | Multi reporter: combine several reporters in one.
ParallelProgressReporter | Test reporter: interactive progress bar of errors.
ProgressReporter | Test reporter: interactive progress bar of errors.
RStudioReporter | Test reporter: RStudio
SilentReporter | Test reporter: gather all errors silently.
skip | Skip a test
skip_if | Skip a test
skip_if_not | Skip a test
skip_if_not_installed | Skip a test
skip_if_offline | Skip a test
skip_if_translated | Skip a test
skip_on_appveyor | Skip a test
skip_on_bioc | Skip a test
skip_on_ci | Skip a test
skip_on_covr | Skip a test
skip_on_cran | Skip a test
skip_on_os | Skip a test
skip_on_travis | Skip a test
snapshot_accept | Snapshot management
snapshot_review | Snapshot management
StopReporter | Test reporter: stop on error.
succeed | Default expectations that always succeed or fail.
SummaryReporter | Test reporter: summary of errors.
TapReporter | Test reporter: TAP format.
TeamcityReporter | Test reporter: Teamcity format.
teardown_env | Run code after all test files
testing_package | Determine testing status
test_check | Run all tests in a package
test_file | Run all tests in a single file
test_local | Run all tests in a package
test_package | Run all tests in a package
test_path | Locate file in testing directory.
test_that | Create a test.
use_catch | Use Catch for C++ Unit Testing