Automated Testing with RPAC

The RPASCE Pluggable Automation Component (RPAC) utility is supported for use with RPASCE cloud application deployments. RPAC tests are specified in XML-format text files and cover a range of RPASCE application and segment activities. Note that RPAC does not support the testing of GUI functions and is not a performance testing tool. In order to support the validation of a newly installed or patched environment, in the context of configured daily or weekly batch operations, RPAC for Cloud deployments is supported through new entries in the RPASCE Batch task catalog. These tasks allow a pre-production application to be set to a known state through a combination of hierarchy load and measure load files, and then can compare both application and segment workspace measures to known values represented either directly in the test xml files or in data comparison files. This is similar to a measure data load file, but used only for comparison rather than for loading.

Three types of collateral files are involved in the RPAC testing process:

  • Input data file set: a group of hierarchy (.dat) and measure (.ovr, .clr, or .rpl) data files that must be loaded into the application before any RPAC tests are run. Uploaded to Object Storage in the planning/incoming/rpac directory as input.zip.

  • Test file set: one or more .xml files where tests and test suites are defined using the available set of RPAC tags and attributes. Uploaded to Object Storage in the planning/incoming/rpac directory as tests.zip.

  • Comparison data file set: an optional way to efficiently validate that one or more measures currently contain an expected set of values. Uploaded to the Object Storage planning/incoming/rpac directory as compare.zip.

Each of these collateral file archives, once sent through the Object Storage interface, will be kept internally to be used every time an RPAC-enabled batch execution sequence is run. Updates to the collateral files can be sent to the Object Storage site before the next call of the initrpac batch task and will be brought into the active environment at that time. Note that when any of the collateral file archives is updated, the previous contents are entirely removed from the internal storage area, so the replacement archive file must be a complete set of files of that type. This prevents stale test scripts or data files from being left in the environment.

The two RPASCE Batch tasks, initrpac and runrpac, are detailed in the batch task catalog in "Initialize Testing Environment: initrpac" and "Execute Automated Tests: runrpac". The initrpac task is expected to be run once, at the start of the RPAC-enabled batch exec sequence; the runrpac task can be called multiple times, including at separate points during the batch exec sequence, if needed. Here is an example batch execution sequence that shows how an existing weekly batch specification might be augmented with RPAC tests:

# Standard Weekly Batch Cycle
weekly | unpack    | weekly_sales.zip~ftp
weekly | hierload  | prod~14~N
weekly | hierload  | loc~14~N
weekly | measload  | load_oo_list
weekly | calc      | batch_fcst
weekly | autobuild |

# RPAC-enhanced Batch Cyle
validate | initrpac  |
validate | hierload  | prod~14~N
validate | hierload  | loc~14~N
validate | measload  | load_oo_list
validate | runrpac   | RPAC_Domain_Tests~DomainTests.xml
validate | calc      | batch_fcst
validate | runrpac   | RPAC_Segment_Tests~SegmentTests.xml

The first section, labeled "weekly", represents a weekly batch sequence that might run at midnight every Saturday. Note that updated hierarchy and measure data files for the week are sent through Object Storage in an archive file named "weekly_sales.zip" using the unpack task.

The second section shows how the weekly batch sequence has been augmented with RPAC tests and named "validate". Note that the unpack task from the weekly sequence has been left out, and in its place initrpac is called to place the test data input files into the application. If new or updated RPAC test collateral files have been placed on the Object Storage server, they will be brought in at this point and used.

There are two sets of RPAC tests in this sequence, specified by the runrpac task entries. The first runs immediately after the hierarchy and measure files are loaded, and validates expected values in the application. The second test set is executed after some further calculations have been run, and builds one or more segments, then validates values within them as well.

When RPAC-enabled batch sequences are run, the primary log file, which is available through the Online Administration dashboard as well as through the Object Storage log archive package, will show a brief summary of test results. Full test details and log files are available in the complete log archive package from the batch exec run, available in the Object Storage area once the execution has completed.

For full details on the contents of an RPAC test .xml file, and all the tags and attributes that are available for specifying RPAC tests, see "RPASCE Test Automation" in Oracle Retail Predictive Application Server Cloud Edition Administration Guide. Note that the latest version of this guide specifies which RPAC features are available for Cloud deployments. Due to Cloud security constraints, some RPAC features, primarily the <SHELL> tag, have been disabled; however, inclusion of RPAC tests as a step in existing batch execution sequences should fully compensate for this restriction.