Skip to contents

Purpose of Testing

The testing in this phase is to ensure the R package and the UI on top of it meet all user requirements (URS) and behaves as the end users expect. If any of the tests fail, it is possible to detect loopholes and fix errors early in development.

Note that access security and scalability are taken care of by the V-COP environment. The purpose of this testing is limited to all functional requirements. Interfacing ability via API with V-COP file management and the validated run environment is designed to be tested manually.

One important aspect of testing is to verify the functions used in the analysis do what they are supposed to do. There are many functions in different R packages designed to perform the same task, however, with different assumptions behind. The outcome may be similar or different, it is important that we understand the details and choose the most appropriate ones.

Structure of Testing

Unit Testing for this Helper Package

The unit testing is written using testthat an can be run via:

devtools::test()

Unit Testing for Other R functions involved in the Analysis

Unit testing for functions not included in this package is written in the directory:

inst/SystemTesting/Verify_R_FS

file_lists <- list.files(paste0("path0","/inst/SystemTesting/Verify_R_FS"))
if("_snaps" %in% file_lists) {file_lists <- file_lists[file_lists!="_snaps"]}
testResultsRaw_list <- lapply(file_lists,function(x)testthat::test_file(paste0(path0,"/inst/SystemTesting/Verify_R_FS/",x), reporter = testthat::ListReporter))

System Testing

The test cases are designed by Sarah Baumert and Harold.

inst/SystemTesting/Validate_TS