testthat: Get Started with Testing

Software testing is important, but many of us don’t do it because it is frustrating and boring. testthat is a new testing framework for R that is easy learn and use, and integrates with your existing workflow. This paper shows how, with illustrations from existing packages.

Hadley Wickham
2011-6-01

CRAN packages used

testthat, RUnit, svUnit, stringr, lubridate

CRAN Task Views implied by cited packages

ReproducibleResearch, TimeSeries

Reuse

Text and figures are licensed under Creative Commons Attribution CC BY 4.0. The figures that have been reused from other sources don't fall under this license and can be recognized by a note in their caption: "Figure from ...".

Citation

For attribution, please cite this work as

Wickham, "testthat: Get Started with Testing", The R Journal, 2011

BibTeX citation

@article{RJ-2011-002,
  author = {Wickham, Hadley},
  title = {testthat: Get Started with Testing},
  journal = {The R Journal},
  year = {2011},
  note = {https://doi.org/10.32614/RJ-2011-002},
  doi = {10.32614/RJ-2011-002},
  volume = {3},
  issue = {1},
  issn = {2073-4859},
  pages = {5-10}
}