testthat: Unit Testing for R
Version 1.0.2

A unit testing system designed to be fun, flexible and easy to set up.

Browse man pages Browse package API and functions Browse package files

AuthorHadley Wickham [aut, cre], RStudio [cph]
Date of publication2016-04-23 08:37:40
MaintainerHadley Wickham <hadley@rstudio.com>
LicenseMIT + file LICENSE
Version1.0.2
URL https://github.com/hadley/testthat
Package repositoryView on CRAN
InstallationInstall the latest version of this package by entering the following in R:
install.packages("testthat")

Man pages

auto_test: Watches code and tests for changes, rerunning tests as...
auto_test_package: Watches a package for changes, rerunning tests as...
CheckReporter: Check reporter: 13 line summary of problems
compare: Provide human-readable comparison of two objects
compare_state: Compare two directory states.
comparison-expectations: Expectation: is returned value less or greater than specified...
context: Describe the context of a set of tests.
describe: describe: a BDD testing language
dir_state: Capture the state of a directory.
equality-expectations: Expectation: is the object equal to a value?
evaluate_promise: Evaluate a promise, capturing all types of output.
expectation: Expectation class.
expect_cpp_tests_pass: Test Compiled Code in a Package
expect_equal_to_reference: Expectation: is the object equal to a reference value stored...
expect_length: Expectation: does a vector have the specified length?
expect_match: Expectation: does string/output/message/warning/error match a...
expect_named: Expectation: does object have names?
expect_success: Tools for testing expectations
expect_that: Expect that a condition holds.
fail: Default expectations that alway succeed or fail.
FailReporter: Test reporter: fail at end.
find_reporter: Find reporter object given name or object.
find_test_scripts: Find the test files.
inheritance-expectations: Expectation: does the object inherit from a S3 or S4 class,...
ListReporter: List reporter: gather all test results along with elapsed...
logical-expectations: Expectation: is the object true/false?
make_expectation: Make an equality test.
MinimalReporter: Test reporter: minimal.
MultiReporter: Multi reporter: combine several reporters in one.
not: Negate an expectation
oldskool: Old-style expectations.
output-expectations: Expectation: does code produce output/message/warning/error?
reexports: Objects exported from other packages
Reporter: Stub object for managing a reporter of tests.
reporter-accessors: Get/set reporter; execute code in specified reporter.
RstudioReporter: Test reporter: RStudio
safe_digest: Compute a digest of a filename, returning NA if the file...
SilentReporter: Test reporter: gather all errors silently.
skip: Skip a test.
source_file: Source a file, directory, or all helpers.
StopReporter: Test reporter: stop on error.
SummaryReporter: Test reporter: summary of errors.
takes_less_than: Expectation: does expression take less than a fixed amount of...
TapReporter: Test reporter: TAP format.
TeamcityReporter: Test reporter: Teamcity format.
test_dir: Run all of the tests in a directory.
test_env: Generate default testing environment.
test_examples: Test package examples
test_file: Run all tests in specified file.
test_package: Run all tests in an installed package.
test_path: Locate file in testing directory.
testthat: R package to make testing fun!
test_that: Create a test.
testthat_results: Create a 'testthat_results' object from the test results as...
try_again: Try evaluating an expressing multiple times until it...
use_catch: Use Catch for C++ Unit Testing
watch: Watch a directory for changes (additions, deletions &...
with_mock: Mock functions in a package.

Functions

CheckReporter Man page
FailReporter Man page
ListReporter Man page
MinimalReporter Man page
MultiReporter Man page
Reporter Man page
RstudioReporter Man page
SilentReporter Man page
StopReporter Man page
SummaryReporter Man page
TapReporter Man page
TeamcityReporter Man page
\%>\% Man page
add_info Source code
all_passed Source code
as.data.frame.testthat_results Source code
as.expectation Source code
as.expectation.default Source code
as.expectation.error Source code
as.expectation.expectation Source code
as.expectation.logical Source code
as.expectation.skip Source code
as.expectation.warning Source code
auto_test Man page Source code
auto_test_package Man page Source code
capture_first_expectation Source code
capture_messages Man page Source code
capture_output Man page Source code
capture_output_as_vector Source code
capture_warnings Man page Source code
colourise Source code
compare Man page Source code
compare.POSIXt Man page Source code
compare.character Man page Source code
compare.default Man page Source code
compare.numeric Man page Source code
compare_state Man page Source code
comparison Source code
comparison-expectations Man page
context Man page Source code
create_traceback Source code
describe Man page Source code
diff_attr Source code
diff_class Source code
diff_length Source code
diff_type Source code
difference Source code
dir_state Man page Source code
encourage Source code
end_context Source code
env_name Source code
equality-expectations Man page
equals Man page Source code
equals_reference Man page Source code
evaluate_promise Man page Source code
expect Man page Source code
expect_compare Source code
expect_cpp_tests_pass Man page Source code
expect_equal Man page Source code
expect_equal_to_reference Man page Source code
expect_equivalent Man page Source code
expect_error Man page Source code
expect_failure Man page Source code
expect_false Man page Source code
expect_gt Man page Source code
expect_gte Man page Source code
expect_identical Man page Source code
expect_is Man page Source code
expect_length Man page Source code
expect_less_than Man page Source code
expect_lt Man page Source code
expect_lte Man page Source code
expect_match Man page Source code
expect_message Man page Source code
expect_more_than Man page Source code
expect_named Man page Source code
expect_null Man page Source code
expect_output Man page Source code
expect_output_file Man page Source code
expect_s3_class Man page Source code
expect_s4_class Man page Source code
expect_silent Man page Source code
expect_success Man page Source code
expect_that Man page Source code
expect_true Man page Source code
expect_type Man page Source code
expect_warning Man page Source code
expectation Man page Source code
expectation_broken Source code
expectation_error Source code
expectation_failure Source code
expectation_ok Source code
expectation_skip Source code
expectation_success Source code
expectation_type Source code
expectation_warning Source code
extract_mocks Source code
f_name Source code
fail Man page Source code
failure_header Source code
failure_summary Source code
find_first_srcref Source code
find_label Source code
find_reporter Man page Source code
find_reporter_one Source code
find_test_scripts Man page Source code
format.expectation Source code
format.expectation_error Source code
format.expectation_success Source code
format.mismatch_character Source code
format.mismatch_numeric Source code
get_messages Source code
get_reporter Man page Source code
get_routine Source code
gives_warning Man page Source code
has_names Man page Source code
in_testing_dir Source code
inheritance-expectations Man page
is.expectation Man page Source code
isS3 Source code
is_a Man page Source code
is_directory Source code
is_equivalent_to Man page Source code
is_false Man page Source code
is_identical_to Man page Source code
is_less_than Man page Source code
is_more_than Man page Source code
is_null Man page Source code
is_readable Source code
is_true Man page Source code
is_vector Source code
klass Source code
label Source code
logical-expectations Man page
make_expectation Man page Source code
make_label Source code
matches Man page Source code
mismatch_character Source code
mismatch_numeric Source code
mock Source code
no_difference Source code
normalise_names Source code
not Man page Source code
null Source code
o_apply Source code
oldskool Man page
output-expectations Man page
praise Source code
print.comparison Source code
print.expectation Source code
print.mismatch_character Source code
print.mismatch_numeric Source code
print.testthat_results Source code
print_out Source code
prints_text Man page Source code
reexports Man page
reporter-accessors Man page
reset_mock Source code
rule Source code
run_tests Source code
safe_digest Man page Source code
safe_read_lines Source code
same_attr Source code
same_class Source code
same_length Source code
same_type Source code
set_mock Source code
set_reporter Man page Source code
show_stack Source code
shows_message Man page Source code
single_letter_summary Source code
skip Man page Source code
skip_if_not Man page Source code
skip_if_not_installed Man page Source code
skip_on_appveyor Man page Source code
skip_on_bioc Man page Source code
skip_on_cran Man page Source code
skip_on_os Man page Source code
skip_on_travis Man page Source code
skip_summary Source code
source_dir Man page Source code
source_file Man page Source code
source_test_helpers Man page Source code
src_loc Source code
standardise_tzone Source code
starts_with Source code
str_chunk Source code
str_trunc Source code
succeed Man page Source code
sumarize_one_test_results Source code
takes_less_than Man page Source code
teamcity_escape Source code
test_check Man page Source code
test_code Source code
test_dir Man page Source code
test_env Man page Source code
test_example Man page Source code
test_examples Man page Source code
test_file Man page Source code
test_files Source code
test_package Man page Source code
test_path Man page Source code
test_pkg_env Source code
test_that Man page Source code
testthat Man page
testthat-package Man page
testthat_results Man page Source code
throws_error Man page Source code
try_again Man page Source code
use_catch Man page Source code
vector_equal Source code
vector_equal_tol Source code
watch Man page Source code
with_mock Man page Source code
with_reporter Man page Source code
with_sink Source code
with_top_env Source code

Files

inst
inst/CITATION
inst/resources
inst/resources/test-cpp.R
inst/resources/test-runner.cpp
inst/resources/test-example.cpp
inst/include
inst/include/testthat.h
inst/include/testthat
inst/include/testthat/vendor
inst/include/testthat/vendor/catch.h
inst/include/testthat/testthat.h
tests
tests/test-catch.R
tests/testthat.R
tests/testthat
tests/testthat/test-evaluate-promise.R
tests/testthat/test-expect-output.R
tests/testthat/test-reporter-tap.R
tests/testthat/test-expect-equal-to-reference.R
tests/testthat/test-compare-time.R
tests/testthat/test-expect_that.R
tests/testthat/test-cpp.R
tests/testthat/test-label.R
tests/testthat/test_dir
tests/testthat/test_dir/test-bare-expectations.R
tests/testthat/test_dir/test-helper.R
tests/testthat/test_dir/test-empty.R
tests/testthat/test_dir/test-skip.R
tests/testthat/test_dir/test-failures.R
tests/testthat/test_dir/test-basic.R
tests/testthat/test_dir/test-errors.R
tests/testthat/test_dir/helper_hello.R
tests/testthat/test-test-that.R
tests/testthat/test-colour.R
tests/testthat/test-reporter.R
tests/testthat/test-expect-named.R
tests/testthat/test-not.R
tests/testthat/test-path-present
tests/testthat/test-path-present/tests
tests/testthat/test-path-present/tests/testthat
tests/testthat/test-path-present/tests/testthat/empty
tests/testthat/test-context.R
tests/testthat/test-reporter-list.R
tests/testthat/test-expect-length.R
tests/testthat/test-source_dir.R
tests/testthat/test-old-school.R
tests/testthat/test-bare.R
tests/testthat/test-test_dir.R
tests/testthat/test-expect-null.R
tests/testthat/test-path-missing
tests/testthat/test-path-missing/empty
tests/testthat/test-compare-character.R
tests/testthat/test-expect-self-test.R
tests/testthat/test-expect-warning.R
tests/testthat/one.rds
tests/testthat/test-expect-silent.R
tests/testthat/reporters
tests/testthat/reporters/silent.txt
tests/testthat/reporters/tap.txt
tests/testthat/reporters/teamcity.txt
tests/testthat/reporters/check.txt
tests/testthat/reporters/summary.txt
tests/testthat/reporters/rstudio.txt
tests/testthat/reporters/tests.R
tests/testthat/reporters/minimal.txt
tests/testthat/test-catch.R
tests/testthat/test-comparisons.R
tests/testthat/test-helpers.R
tests/testthat/test-reporter-multi.R
tests/testthat/test-compare-numeric.R
tests/testthat/test-describe.R
tests/testthat/test-test-path.R
tests/testthat/test-try-again.R
tests/testthat/test-expect-logical.R
tests/testthat/test-expect-message.R
tests/testthat/test-expect-error.R
tests/testthat/test-expect-inheritance.R
tests/testthat/test-expect-match.R
tests/testthat/test-mock.R
tests/testthat/helper-assign.R
tests/testthat/test-expect-equality.R
tests/testthat/test-environment.R
tests/testthat/context.R
tests/testthat/test-watcher.R
src
src/Makevars
src/test-runner.cpp
src/test-example.cpp
src/test-catch.cpp
src/Makevars.win
src/label.c
src/reassign.c
NAMESPACE
NEWS.md
R
R/old-school.R
R/reporter.R
R/reporter-check.R
R/test-files.R
R/utils.R
R/expect-named.R
R/expectations-matches.R
R/mock.R
R/reporter-list.R
R/evaluate-promise.R
R/colour-text.R
R/expect-output.R
R/expect-length.R
R/expect-comparison.R
R/expectation.R
R/expect-inheritance.R
R/reporter-teamcity.R
R/compare-numeric.R
R/skip.R
R/test-path.R
R/make-expectation.R
R/auto-test.R
R/test-example.R
R/expect-equal-to-reference.R
R/compare-character.R
R/reporter-multi.R
R/reporter-rstudio.R
R/test-compiled-code.R
R/reporter-stop.R
R/watcher.R
R/reporter-silent.R
R/source.R
R/reporter-tap.R
R/test-that.R
R/compare-time.R
R/try-again.R
R/test-package.R
R/stack.R
R/expect-self-test.R
R/expect-equality.R
R/reporter-summary.R
R/reporter-fail.R
R/compare.R
R/expect-logical.R
R/praise.R
R/expect-that.R
R/reporter-minimal.R
R/describe.R
R/context.R
R/traceback.R
R/reporter-zzz.R
README.md
MD5
DESCRIPTION
man
man/FailReporter.Rd
man/test_file.Rd
man/test_path.Rd
man/SilentReporter.Rd
man/try_again.Rd
man/describe.Rd
man/test_package.Rd
man/fail.Rd
man/find_reporter.Rd
man/compare_state.Rd
man/expect_length.Rd
man/make_expectation.Rd
man/equality-expectations.Rd
man/Reporter.Rd
man/TeamcityReporter.Rd
man/test_examples.Rd
man/output-expectations.Rd
man/expect_that.Rd
man/TapReporter.Rd
man/SummaryReporter.Rd
man/expectation.Rd
man/test_env.Rd
man/test_that.Rd
man/RstudioReporter.Rd
man/auto_test_package.Rd
man/takes_less_than.Rd
man/MultiReporter.Rd
man/test_dir.Rd
man/with_mock.Rd
man/MinimalReporter.Rd
man/comparison-expectations.Rd
man/evaluate_promise.Rd
man/auto_test.Rd
man/expect_cpp_tests_pass.Rd
man/reexports.Rd
man/compare.Rd
man/expect_named.Rd
man/dir_state.Rd
man/CheckReporter.Rd
man/expect_success.Rd
man/logical-expectations.Rd
man/expect_equal_to_reference.Rd
man/expect_match.Rd
man/context.Rd
man/testthat.Rd
man/ListReporter.Rd
man/safe_digest.Rd
man/not.Rd
man/reporter-accessors.Rd
man/watch.Rd
man/use_catch.Rd
man/StopReporter.Rd
man/testthat_results.Rd
man/source_file.Rd
man/skip.Rd
man/find_test_scripts.Rd
man/oldskool.Rd
man/inheritance-expectations.Rd
LICENSE
testthat documentation built on May 19, 2017, 9:39 p.m.