John Mount points out that you don’t need special infrastructure to perform unit testing in R:
There seems to be a general (false) impression among non R-core developers that to run tests,
R
package developers need a test management system such asRUnit
ortestthat
. And a further false impression thattestthat
is the onlyR
test management system. This is in fact not true, asR
itself has a capable testing facility in “R CMD check
” (a command triggeringR
checks from outside of any given integrated development environment).By a combination of skimming the
R
-manuals ( https://cran.r-project.org/manuals.html ) and running a few experiments I came up with a description of howR
-testing actually works. And I have adapted the available tools to fit my current preferred workflow. This may not be your preferred workflow, but I have and give my reasons below.
Food for thought for any R developer.