Learn R Programming

RTest (version 1.2.6)

A XML-Based Testing Framework for Automated Component Tests of R Packages

Description

This provides a framework for R packages developed for a regulatory environment. It is based on the 'testthat' unit testing system and provides the adapter functionalities for XML-based test case definition as well as for standardized reporting of the test results.

Copy Link

Version

Install

install.packages('RTest')

Monthly Downloads

32

Version

1.2.6

License

GPL (>= 2)

Maintainer

Sebastian Wolf

Last Published

December 4th, 2019

Functions in RTest (1.2.6)

example_list_large

Function returning a list with three values and large DF
clearTest

Clear Test Reporter and Test Cache of Last Test Case Execution
getRTMInfos

Create RTM from executed test cases
getExecSummary.html

Create HTML Summary of the Last Execution of the Test Case
example_list

Function returning a list with three values
example_image

Function returning the Roche logo as an image at tempdir
getRTMInMatrixShape

Get RTM for all executed test cases in a matrix shape
getExecSummary

Summary of the Last Execution of the Test Case
example_vector

Function returning a character vector of length "rep"
RTest.cat

Write Text To Console
exec

Tests imported Test Cases
getID

Get ID of the Test Case
example_data_frame

Function changing a data frame by adding a column
getExecDetails.html

Create Detailed HTML Summary of the Last Execution of the Test Case
getType

Get Type of the Test Case
package_md5

Function to derive an md5 hash of a package in a current session
getRTM

Get RTM for all executed test cases
getValidTCs

Get a List of TCs
importTC

Import Test Case from XML File
systemInfo.RInst

Summarize R Version Information
importTCsFromDir

Import all Test Cases from XML Files of a Directory
png2base64

Converts a PNG File Into a Base64 String for Using IT as Inline Image in HTML Files
getExecStates

Execution Statues of TCs
getSynopsis

Get Synopsis of the Test Case
setTestMethod

Create and Save a Default Test Method For a Test Case Adapter
show,RTestCase-method

Print Summary of the Test Case to Console
getTC

Return Imported Test Case
htmlify_string

function to make strings xml and html compatible
getfun

function to derive external package functionalities
summary,RTestCollection-method

Execution Summary As R Data Object
show

Show Summary of RTestCollection Instance
test_returnValue_data.frame_cellbycell

Tests a Standard R 'data.frame' Cell-By-Cell ('RTestTest_data.frame_cellbycell')
example_variable

Function returning relative difference of X and Y
systemInfo.host

Summarize Host System Information
test_returnValue_data.frame_shape

Tests a Standard R 'data.frame' by shape, rownames and colnames ('RTestTest_data.frame_shape')
getXMLSourceFileName

Get File Name of the XML Input File of the Test Case
generic

Generic test adapter Method
expect_testthat

testthat expect fun
getXMLRoot

Get the XML Root of the Test Case
test_returnValue_vector_elementbyelement

Tests a Standard R 'vector' Element-By-Element ('RTestTest_vector_elementbyelement')
test_returnValue_variable

Tests a Standard R 'variable' ('RTestTest_vector_variable')
execAdapter

Execute the Adapter Function of the Test Case
writeExecSummary.html

Write Summary of Last Test Case Executions as HTML
xmlReadData_text

Read XML Data From Type 'xmlReadData_text' as R Variable
test_returnValue_image

Tests an image file with ImageMagick ('RTestTest_image')
test_returnValue_list_nodebynode

Tests a Standard R 'list' Node-By-Node ('RTestTest_list_nodebynode')
xmlRead.default

General import function to reads XML data of different types
xmlFromList

Creat an XML Node from a list
xmlReadData_to_list

Read an unidentified List of Data Types from TestCase params
xmlWriteSynopsis

Write the Synopsis for a RTestCase
xmlWriteTest

Write the Test section for a RTestCase
xmlWriteTestFunction

Write the Test section for a RTestCase
xmlWriteTestSpec

Write the testpsec section for a RTestCase
initializeTests

Initialize the Test Slot for a Test Case.
xmlReadData_data.frame

Read XML Data From Type 'xmlReadData_data.frame' as R 'data.frame'
xmlWriteContext

Write the Opening (Header, Root-Tag) and Closing for a RTestCase
xmlWriteData_vector

Write a R 'vector' as XML Data of Type 'xmlReadData_vector'
expect_less_than

Expect less or more
execCache

Execution Cache for Test Function
xmlWriteData_data.frame

Write a R 'data.frame' as XML Data of Type 'xmlReadData_data.frame'
expect_silent_RTest

Expect a function call to run silent
xmlWriteTest_list_nodebynode

Write XML Test Definition of Type 'RTestTest_list_nodebynode'
normalizeDate

Reformat a Date String
systemInfo.packages

Summarize System Packages
getTestFor

Get For of Last Execution of the Test Case
getXMLSourcePath

Get Path to the XML Input File of the Test Case
get_existence_of_fun

Find out if a function is available
getTestResult

Get Result of Last Execution of the Test Case
test.RTest.funct_01

Test Function For Testing Function 'RTest::test_returnValue_data.frame_cellbycell'
quasi_capture

Method capturing the run
xmlWriteTest_variable

Write XML Test Definition of Type 'RTestTest_variable'
test_fun

A simple function to Test the RTest package
readXMLInputData

Read Input Data of Test Case for Default XML Definitions
test_returnValue_any

Generically compare two values with RTest
xmlReadData_image

Read XML Data From Type 'xmlReadData_image' as R Variable
xmlWriteInputData

Write the Input-Data section for a RTestCase
test

Execute Test Logic of the Test Case
xmlWriteTest_vector_elementbyelement

Write XML Test Definition of Type 'RTestTest_vector_elementbyelement'
xmlWriteData_variable

Write a R 'constat' as XML Data of Type 'xmlReadData_variable'
xmlReadData_list

Read XML Data From Type 'xmlReadData_list' as R 'list' (DUMMY)
xmlWriteData_params

Write params for XML test cases 'xmlReadData_params'
test_execution

Tests Silent Execution of an Function
xmlReadData_variable

Read XML Data From Type 'xmlReadData_variable' as R Variable
xmlReadData_vector

Read XML Data From Type 'xmlReadData_vector' as R Vector
xmlWriteTests

Write the Tests section for a RTestCase
xmlWriteData_list

Write a R 'list' as XML Data of Type 'xmlReadData_list'
xmlWriteData_matrix

Write a R 'matrix' as XML Data of Type 'xmlReadData_matrix'
xmlWriteTest_execution

Write XML Test Definition of Type 'RTestTest_execution'
xmlWriteTest_data.frame_cellbycell

Write XML Test Definition of Type 'RTestTest_data.frame_cellbycell'
RTest

RTest: A XML-based Testing System For R Packages
RTest.getRTM

Function to return a risk tracibility matrix from a folder with XML files
RTest.print

Print Text To Console
RTestCase-class

The 'RTestCase' Class
RTest.execute

Function to generally execute a Test Case collection
RTestCase

Constructor for RTestCase
RTestCollection

Constructor for 'RTestCollection'
arguments_creator

Read arguments from RTest 'param'-XML Node
RTestCollection-class

Class Definition 'RTestCollection'