The testwhat package provides rich functionality to write Submission Correctness Tests for interactive R exercises on the DataCamp platform. The package is inspired by Hadley Wickham's testthat package, the standard for unit testing in R. For a detailed guide on how to use testwhat, head over to the wiki. To learn more about course creation for DataCamp, visit our Teach Documentation.

Installation

library("devtools")
install_github("datacamp/testwhat")

Testing this package

Because testwhat depends on proprietary R packages, you can only run the tests on a system that has these packages installed. If you have the private codecov token, you can also upload the coverage results:

# Run the tests locally
devtools::test()

# Run only a part of the tests
devtools::test(filter = "test-object")

# Upload code coverage report to codecov.io
covr::codecov(token = "private_token")

For more details, questions and suggestions, you can contact content-engineering@datacamp.com.

Copy Link

Version

Down Chevron

Version

4.2.2

License

MIT + file LICENSE

Last Published

July 31st, 2014

Functions in testwhat (4.2.2)