Learn R Programming

RTest (version 1.2.6)

generic: Generic test adapter Method

Description

Generic test adapter Method

Arguments

object

(object) The RTestCase-class object

inputData

(list) List of input values

execCache

(list) list of already executed tests and their return values

xmlDef

(xmlNode) xmlNode of the Test case

package

(character) Name of the package to be tested

...

additional values can be given from execAdapter

Value

(list)

See Also

RTestCase-class

Examples

Run this code
# NOT RUN {
options("RTest_verbose" = TRUE)

testCollection <- new("RTestCollection",
    project.name    = "RTest Vignette",
    project.details = "Example test exectuion",
    tester          = "Example tester",
    test.start      = format(Sys.time(), "%Y-%m-%d %H:%M:%S"))

TCDir <- paste0(find.package("RTest"),"/xml-templates")

testCollection <- RTest::importTCsFromDir(testCollection,
    xml.dPath = TCDir,f.pattern  = "RTest_TC-02.xml")


outf <- tempfile(fileext=".html")

funct_02 <<- function(data, mult) {   cbind(data, "sum" = apply(data, 1, sum)*mult) }
environment(funct_02) <- asNamespace('RTest')

testCollection <- RTest::exec(testCollection, out.fPath = outf, open=FALSE)

# }

Run the code above in your browser using DataLab