runTests: Run tests in isolation

View source: R/RtestingHelpers.R

runTestsR Documentation

Run tests in isolation

Description

Runs tests in a folder in a separate R session.

Usage

runTests(
  testsFolder = firstDef(options("testme")$testme$testsFolder, "./Rtests"),
  expectationsFolder = options("testme")$testme$expectationsFolder,
  sourceFiles = options("testme")$testme$sourceFiles,
  isolateSession = TRUE,
  useGit = TRUE
)

Arguments

testsFolder

Folder to be tests. Default folder is taken from ‘options(’testme')$testme$testsFolder'.

expectationsFolder

Folder where expectations are stored. Default folder is taken from ‘options(’testme')$testme$expectationsFolder'.

sourceFiles

pathes to files that should be sourced prior to running the tests. These would typically hold initialization code.

isolateSession

boolean to indicate whether a new R session should be started (using 'Rscript') or whether to run tests in the current R session

useGit

logical to indicate whether test vivifications should be commited

Value

returns 0 on success, value greater 0 if tests failed

Examples

## Not run: 
  runTests()

## End(Not run)

sboehringer/testme documentation built on Jan. 17, 2024, 4:58 p.m.