Learn R Programming

RTest (version 1.2.6)

exec: Tests imported Test Cases

Description

Tests imported Test Cases

Usage

# S4 method for RTestCollection
exec(object, test.TCs = NULL,
  test.for = NULL, out.fPath = NULL, open = TRUE, ...)

Arguments

object

(object) The RTestCollection-class object.

test.TCs

(character) Vector with the TCs to be executed or NULL if all all TCs of the collection should be tested.

test.for

(vector(character)) Specification for which elements to test, NULL for test all elements

out.fPath

(character) Path to output file.

open

(logical) Should the generated file be opened (TRUE) or not (FALSE) after report generation.

...

(logical) Additional parameters passed to function writeExecSummary.html.

See Also

RTestCollection-class

Examples

Run this code
# NOT RUN {
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 <- list.dirs(find.package("RTest"),recursive = TRUE) %>%
   grep(pattern = "xml-templates", value = TRUE)

message("Test Adapter being used is defined in Function")
message("test.RTest.test_returnValue_data.frame_cellbycell")

testCollection <- importTCsFromDir(testCollection,
    xml.dPath = TCDir[1],f.pattern  = "RTest_TC-01.xml")

testCollection <- exec(testCollection)

outf <- tempfile(fileext=".html")
writeExecSummary.html(testCollection, out.fPath = outf,open = FALSE)

stopifnot(any(grepl("passed",readLines(outf))))

# }

Run the code above in your browser using DataLab