svTestData | R Documentation |
The 'svTestData' contains results of test run. The checkxxx()
functions and
the runTest()
method generate one such object which is located in the
.Log
object in .GlobalEnv
. It is then possible to display and report
information it contains in various ways to analyze the results.
is.svTestData(x) stats(object, ...) ## S3 method for class 'svTestData' stats(object, ...) ## S3 method for class 'svTestData' print(x, all = FALSE, header = TRUE, file = "", append = FALSE, ...) ## S3 method for class 'svTestData' summary(object, header = TRUE, file = "", append = FALSE, ...) ## S3 method for class 'svTestData' protocol_junit(object, ...)
x |
Any kind of object, or a 'svTestData' object in the case of
|
object |
A 'svTestData' object. |
... |
Further arguments to pass to methods. Not used yet. |
all |
Do we print concise report for all test, or only for the tests that fail or produce an error? |
header |
Do we print a header or not? |
file |
Character. The path to the file where to write the report. If
|
append |
Do we append to this file? |
is.svTestData()
returns TRUE
if the object is an 'svTestData'. The
various methods serve to extract or print content in the object.
Philippe Grosjean
svTest()
, is.svSuiteData()
, Log()
, checkEquals()
foo <- function(x, y = 2) return(x * y) is.test(foo) # No # Create test cases for this function test(foo) <- function() { checkEqualsNumeric(4, foo(2)) checkEqualsNumeric(5, foo(2, 3)) checkEqualsNumeric(5, foo(nonexists)) } # Generate a 'svTestData' object by running the test obj <- runTest(foo) # Equivalent to runTest(test(foo)), but shorter obj summary(obj) stats(obj) is.svTestData(obj) rm(foo, obj)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.