Description Usage Arguments Details Value Author(s) See Also Examples
This method executes the test logic for a test case in a testthat
reporter environment.
1 2 3 |
object |
( |
test.for |
( |
out.fPathPre |
( |
... |
Additional arguments passed to the check function. |
This method performs the test logic by iterating through all testgroups as defined in the TC XML
definition file. For each test group it starts a seperate 'ListReporter
', which is
defined in the testthat
package. Then, the different functions of a testgroup are
executed. Therefore, this function calls the method execTCAdapter
, which needs to be
defined for each TestCase type separatly (e.g. for DSTAT, VCA, Calib, etc.). This method is the
adapter function and knows how to read the test case and how to execute the functions, which
should be tested. Thereby, all test results generated using test_that
and the expect_*
of the testthat
package are recorded by the previously started
reporter object. The generated test results are stored (slot test.result
) and the test
execution status set (slot test.status
).
(RTestCase-class
)
Matthias Pfeifer matthias.pfeifer@roche.com
1 2 3 4 5 6 7 8 | location <- find.package("RTest")
TestCase <- RTestCase(xml.fPath =
file.path(location,"xml-templates","RTest_TC-01.xml"))
result <- test(TestCase)
stopifnot(result@test.result == "success")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.