run_test_projects: Run test projects

Description Usage Arguments Value Examples

View source: R/Testproject_Functions.R

Description

Run test projects

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
run_test_projects(
  dir_tests,
  dir_prj_tests = NULL,
  dir_ref = NULL,
  dir_prev = NULL,
  which_tests_torun = seq_along(dir_tests),
  delete_output = FALSE,
  force_delete_output = FALSE,
  make_new_ref = FALSE,
  write_report_to_disk = TRUE,
  verbose = FALSE
)

Arguments

dir_tests

A vector of character strings. Paths to individual test projects.

dir_prj_tests

A character string. Path to overall test projects folder.

dir_ref

A character string. Path to folder with reference database.

dir_prev

A character string. Paths to directory that should be set when function returns.

which_tests_torun

An integer vector. Indices of dir_tests which will be carried out.

delete_output

A logical value. If TRUE then output will be deleted unless problems showed up.

force_delete_output

A logical value. If TRUE then output will be deleted even if problems showed up.

make_new_ref

A logical value. If TRUE then output database will be saved as new reference.

write_report_to_disk

A logical value. If TRUE then report of differences against reference databases is written to disk.

verbose

A logical value.

Value

A list with two elements:

res

A data.frame where each row represents the outcomes of a test project. The columns return elapsed time in seconds elapsed_s, four logical values has_run, has_problems, made_new_refs, deleted_output, and one character string referenceDB of the reference database name against which this run of the test project was compared.

report

A character vector describing differences between test and reference databases including the output of a call to compare_test_output

Examples

1
2
3
4
5
6
7
8
## Not run: 
  # Run test project 4 inside development version of package
  # Assume that working directory is `tests/test_data/TestPrj4/`
  if (file.exists("SFSW2_project_code.R")) {
    res <- run_test_projects(dir_tests = ".", delete_output = TRUE)
  }

## End(Not run)

Burke-Lauenroth-Lab/SoilWat_R_Wrapper documentation built on Aug. 14, 2020, 5:17 p.m.