To run the DataSHIELD tests you require:
- An Opal + DataSHIELD VM
- R installation
- R package source to be tested: currently 'dsBaseClient' or 'dsBetaTestClient'
Preparing R environment:
Install 'devtools':
install.packages("devtools", dependencies = TRUE)
- Install 'testthat':
install.packages("testthat", dependencies = TRUE)
...
Step 0 - Prerequisite
The test framework is installed. More information can be found here: Installing the testing framework
Step 1 - Run the test
Option 1: R studio
- Build and clean the project (Build menu/ Clean and rebuild).
- Run the test, by using the Test Package option, from the Build menu
Option 2: Console
- Change to root directory of R package to be tested
- Use devtools::test() to start testthat