knitr::opts_chunk$set(echo=FALSE)
The purpose of this Validation Testing document is to define the conditions for test execution. All tests are specified and linked to release candidate user stories as numbered issues in the Requirements Specification-Validation Plan document.
library(dplyr) library(readr) library(testthat)
Tests are in three locations
tests/testthat
inst/maintenance/unit
inst/validation
Showing md5 checksum
tarball <- "../../mrgsolve_0.10.0.tar.gz" tools::md5sum(tarball)
install.packages(tarball, repos=NULL)
run_test <- function(dir,d) { cwd <- getwd() on.exit(setwd(cwd)) setwd("../../") x <- test_dir(dir, reporter="check") %>% as_tibble x$result <- NULL x$location <- dir x$date <- d x }
d <- Sys.time()
Tests specified in the Requirements Specification-Validation Plan document are
executed using the run_test()
function, which calls testthat::test_dir
.
y <- run_test("tests/testthat",d)
z <- run_test("inst/maintenance/unit/",d)
x <- run_test("inst/validation",d)
df <- bind_rows(x,y,z)
Summarizes the number of contexts, tests, and expectations and counts number of tests and test failures.
summarise( df, contexts = n_distinct(context), tests = n_distinct(test), number = sum(nb), failed = sum(failed) )
readr::write_csv(path="all_tests.csv", df)
Testing session information is captured.
devtools::session_info()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.