Skip to content
Prev 115391 / 398498 Next

Unit Testing Frameworks: summary and brief discussion

anthony.rossini at novartis.com wrote:
Hi Anthony,

sorry for replying late. I'd like to chip in a brief experience report 
for our company.

We have used RUnit since 2003 starting with R 1.6.2 for our R software 
development. Since then it has been used for development for over a 
dozen packages with ~ 3k unit tests. Making use of S4 classes and 
methods with clear design contracts made its application even more 
fruitful. To automate the test process we utilized
Linux tools to tailor a build and test system to check our R packages 
with previous, current and development versions of R, CRAN and BioC 
packages to guarantee backward compatibility as far as possible whilst 
adapting to changes.

Over time the main benefits have been
  - fearless refactoring of major building blocks of our class hierarchy
  - early detection of and adaptation to changes in new R versions
  - data workflow integration testing
    starting with some data warehouse query initiated from R throughout
    to generated analysis reports using sweave or similar report
    generators.
    With this changes in the warehouse, R, some CRAN R package, our code
    or the report templates could be spotted and fixed
    well before any time critical analysis was due

rewarding the additional effort to write and maintain the tests.


Best regards,

   Matthias