[R-pkgs] testthat 0.6

Hadley Wickham hadley at rice.edu
Fri Dec 30 15:31:18 CET 2011

# testthat
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
* 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](http://rspec.info/),
[bacon](http://github.com/chneukirchen/bacon) and
[cucumber](http://wiki.github.com/aslakhellesoy/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.

Version 0.6

* All `mutatr` classes have been replaced with ReferenceClasses.

* Better documentation for short-hand expectations.

* `test_dir` and `test_package` gain new `filter` argument which allows you to
   restrict which tests are run.

Assistant Professor / Dobelman Family Junior Chair
Department of Statistics / Rice University

More information about the R-packages mailing list