testthat 1.0.2

Unit Testing for R

Homepage: https://github.com/hadley/testthat

Platform: CRAN

Language: R

License: MIT

View on registry: https://cran.r-project.org/package=testthat

Documentation: http://cran.r-project.org/web/packages/testthat/testthat.pdf

Direct download link: https://cran.r-project.org/src/contrib/testthat_1.0.2.tar.gz


testthat

Travis-CI Build Status AppVeyor Build Status Coverage Status CRAN version

Testing your code is normally painful and boring. testthat tries to make testing as fun as possible, so that you get a visceral satisfaction from writing tests. Testing should be fun, not a drag, so you do it all the time. To make that happen, testthat:

  • Provides functions that make it easy to describe what you expect a function to do, including catching errors, warnings and messages.

  • Easily integrates in your existing workflow, whether it's informal testing on the command line, building test suites or using R CMD check.

  • Can re-run tests automatically as you change your code or tests.

  • Displays test progress visually, showing a pass, fail or error for every expectation. If you're using the terminal, it'll even colour the output.

testthat draws inspiration from the xUnit family of testing packages, as well from many of the innovative ruby testing libraries, like rspec, testy, bacon and cucumber. I have used what I think works for R, and abandoned what doesn't, creating a testing environment that is philosophically centred in R.

Instructions for using this package can be found in the Testing chapter of R packages.

Integration with R CMD check

If you're using testthat in a package, you should put your tests in tests/testthat. Each test file should start with test and end in .R or .r. To ensure R CMD check runs your tests, place the following code in tests/testthat.R:

library(testthat)
library(yourpackage)

test_check("yourpackage")

Also make sure to add Suggests: testthat to your DESCRIPTION.


Imports Dependencies Requirements Latest Stable Latest Release Licenses
crayon * 1.3.2 1.3.2 MIT
digest * 0.6.12 0.6.12 GPL-2.0+
magrittr * 1.0.1 1.5 MIT
methods *
praise * 1.0.0 1.0.0 MIT
R6 * 2.2.0 2.2.0 MIT
Explore the resolved imports dependency tree for testthat 1.0.2
Suggests Dependencies Requirements Latest Stable Latest Release Licenses
devtools * 1.12.0 1.12.0 GPL-2.0+
Explore the resolved suggests dependency tree for testthat 1.0.2
Depends Dependencies Requirements Latest Stable Latest Release Licenses
R >= 3.1.0
Explore the resolved depends dependency tree for testthat 1.0.2

Releases

1.0.2 April 23, 2016
1.0.1 April 21, 2016
1.0.0 April 14, 2016
0.11.0 October 14, 2015
0.10.0 May 22, 2015
0.9.1 October 01, 2014
0.9 September 22, 2014
0.8.1 February 22, 2014
0.8 February 20, 2014
0.7.1 March 27, 2013
See all 18 releases

Project Statistics

SourceRank 22
Dependencies 0
Dependent projects 1.44K
Dependent repositories 5.51K
Total releases 18
Latest release
First release
Stars 389
Forks 166
Watchers 36
Contributors 56
Repo Size: 2.28 MB

Top Contributors See all

Hadley Wickham Kirill Müller Kevin Ushey karl-forner-quartz-bio Jim Hester Dirk Schumacher Neal Richardson Craig Citro windelinckx Peter Meilstrup Michał Bojanowski Tomas Kalibera Jeff Allen dkesh Jennifer (Jenny) Bryan Karl Forner Will Beasley James Harris Jon Clayden Jonathan

Something wrong with this page? Make a suggestion

Export .ABOUT file for this library

Last synced: 2017-04-21 14:03:13 UTC

Login to resync this project