0

Are there any frameworks out there for testing object-oriented R code, say R6 classes, that is comparable to JUnit?

As a software engineer coming from the Java world, I find testing R code surprisingly cumbersome when compared to using JUnit for Java or scalatest for Scala.

Endre
  • 690
  • 8
  • 15
  • 1
    Have you checked [`testthat`](https://testthat.r-lib.org/). R6 itself has unit tests using the `testthat` package (see [here](https://github.com/r-lib/R6/blob/master/tests/testthat/test-nonportable.R)). – David Mar 26 '19 at 09:36
  • What @David said -- `testthat` is an easy and convenient but flexible package for testing R code, including code with `R6` classes – duckmayr Mar 26 '19 at 10:14

0 Answers0