Rdocumentation
powered by
Learn R Programming
⚠️
There's a newer version (3.2.3) of this package.
Take me there.
testthat (version 0.6)
Testthat code. Tools to make testing fun :)
Description
A testing package specifically tailored for R that's fun, flexible and easy to set up.
Copy Link
Link to current version
Version
Version
3.2.3
3.2.2
3.2.1.1
3.2.1
3.2.0
3.1.10
3.1.9
3.1.8
3.1.7
3.1.6
3.1.5
3.1.4
3.1.3
3.1.2
3.1.1
3.1.0
3.0.4
3.0.3
3.0.2
3.0.1
3.0.0
2.3.2
2.3.1
2.3.0
2.2.1
2.2.0
2.1.1
2.1.0
2.0.1
2.0.0
1.0.2
1.0.1
1.0.0
0.11.0
0.10.0
0.9.1
0.8.1
0.7.1
0.6
0.5
0.4
0.3
0.2
0.1.1
Install
install.packages('testthat')
Monthly Downloads
578,511
Version
0.6
License
GPL
Maintainer
Hadley Wickham
Last Published
December 30th, 2011
Functions in testthat (0.6)
Search all functions
auto_test_package
Watches a package for changes, rerunning tests as appropriate.
auto_test
Watches code and tests for changes, rerunning tests as appropriate.
StopReporter
Test reporter: stop on error.
matches
Expectation: does string match regular expression?
expectation
Expectation class.
test_dir
Run all of the tests in a directory.
test_package
Run all tests in an installed package
watch
Watch a directory for changes (additions, deletions & modifications).
prints_text
Expectation: does printed output match a regular expression?
library_if_available
Load package, if available.
is_true
Expectation: is the object true?
equals
Expectation: is the object equal (with numerical tolerance) to a value?
find_reporter
Find reporter object given name
is_equivalent_to
Expectation: is the object equivalent to a value? This expectation tests for equivalency: are two objects equal once their attributes have been removed.
error_report
Generate error report from traceback.
SummaryReporter
Test reporter: summary of errors.
Reporter
Stub object for managing a reporter of tests.
gives_warning
Expectation: does expression give a warning?
colourise
Colourise text for display in the terminal.
shows_message
Expectation: does expression show a message?
is_identical_to
Expectation: is the object identical to another?
with_reporter
Execute code in specified reporter.
test_that
Create a test.
is_a
Expectation: does the object inherit from a class?
test_file
Run all tests in specified file.
source_dir
Load all source files in a directory.
MinimalReporter
Test reporter: minimal.
takes_less_than
Expectation: does expression take less than a fixed amount of time to run?
dir_state
Capture the state of a directory.
throws_error
Expectation: does expression throw an error?
context
Describe the context of a set of tests.
expect_that
Expect that a condition holds.
is_false
Expectation: is the object false?
compare_state
Compare two directory states.