A Simple Package for Testing R Packages

A minimal, dependency-free testing framework for R packages. Write tests as simple R expressions that return TRUE, using assert() for assertions (with informative error messages on failure), has_error() / has_warning() / has_message() for testing conditions, and test_pkg() to run all tests with full access to internal (non-exported) package functions. Snapshot testing via Markdown files is also supported.


Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("testit")

1.2 by Yihui Xie, 7 days ago


https://github.com/yihui/testit


Report a bug at https://github.com/yihui/testit/issues


Browse source code at https://github.com/cran/testit


Authors: Yihui Xie [aut, cre] , URL: https://yihui.org) , Tomas Kalibera [ctb] , Steven Mortimer [ctb]


Documentation:   PDF Manual  


MIT + file LICENSE license



Imported by DAISIE, HybridDesign, PBD, QCAcluster, Unico, Wats, elfgen, mcbette, nLTT, netmhc2pan, nodeSub.

Suggested by DDD, DT, GenomeAdmixR, NlsyLinks, animation, blogdown, bookdown, formatR, futile.logger, gsDesign2, highr, knitr, lambda.r, litedown, liteformats, lt, nlmeVPC, pagedown, rticles, test.assessr, tinyimg, tinytex, validata, xaringan, xfun.


See at CRAN