Go to primary content
Oracle® Retail Predictive Application Server Cloud Edition Administration Guide
Release 22.2.401.0
F72005-01
  Go To Table Of Contents
Contents

Previous
Previous
 
Next
Next
 

14 RPASCE Test Automation

This chapter describes an RPASCE utility called "rpac" (RPASCE Pluggable Automation Component). It can be used to perform various tests on an existing application, based on a set of test cases contained in XML files.

This appendix contains the following sections:

Introduction

The rpac utility is used to run highly customizable automated test suites for the RPASCE server. The XML-based framework allows rapid development of tests and ensures that test cases can be quickly copied across locations. The flexible XML schema allows the user to test a large number of RPASCE features, such as writing data to PDS, building a workbook, running custom menu options, and verifying the results.

The XML framework also introduces consistency, accuracy, and reproducibility in the test results. To reproduce a test case, all that is needed is the XML file and a copy of PDS.

Note that rpac operates directly against the PDS itself and therefore does not test any Client/Server interactions.

RPAC in Batch Framework

The rpac utility is supported for use with Enterprise Edition deployments. RPAC tests are specified in XML-format text files and cover a range of RPASCE PDS and Workbook activities. 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 are supported through new entries in the EE Batch task catalog. These tasks allow a pre-production PDS to be set to a known state through a combination of dimension load and fact load files; then both application and Workbook measures can then be compared to known values represented either directly in the test XML files or in data comparison files (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 should be loaded into the PDS before any RPAC tests are run. Uploaded to Object Storage in the 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 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 Object Storage in the rpac directory as compare.zip.

Each of these collateral file archives, once uploaded to Object Storage, will be kept internally to be used every time an RPAC-enabled batch execution sequence is run. Updates to the collateral files can be uploaded to Object Storage 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 EE Batch tasks, initrpac and runrpac, are detailed in the batch task catalog in "Initialize Testing Environment: initrpac" and "Execute Automated Tests: runrpac" in the Implementation Guide. 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_Tests~Tests.xml
validate | calc | batch_fcst
validate | runrpac | RPAC_Workbook_Tests~WorkbookTests.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 uploaded to Object Storage in an archive file named "weekly_sales.tar.gz" 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 PDS. If new or updated RPAC test collateral files have been uploaded to Object Storage, 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 PDS. The second test set is executed after some further calculations have been run, and builds one or more workbooks, then validates values within them as well.

When RPAC-enabled batch sequences are run, the primary log file (available through the Online Administration dashboard as well as through the log archive package uploaded to Object Storage) 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 Object Storage once the execution has completed.

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.

Writing Test Cases

The structure of an rpac test script is defined by the following tags.

Table 14-1 Test Case Tags

Tag Description

<testscript>

The outermost tag for the test script. This tag contains one or more <testsuite> tags.

<testsuite>

This tag defines a suite of tests that are designed to run together. Each suite contains its own <setup>, <teardown>, <testcase>, and <workbook-operations> tags. This tag has a name attribute that can be used with the -suite command line attribute to specify which suites are executed in this run.

<once>

The once tag contains tag elements used to set up the environment once before the first test case is executed. It is a tag like setup, but only happens once at the start of a test suite. The once tag has been added to allow a set of measures to be backed up once during the run of the test suite.

<finalize>

The finalize tag contains tag elements used to restore the environment after the final test case is executed.

<setup>

This tag sets the preconditions that are common to all test cases. Operations inside this tag are run before every test case is executed.

Example operations:

  • Set RpasToday so the test date is consistent for every test run.

  • Pre-set measure values so tests operate in a known state.

  • Check any preconditions to make sure this test run is valid.

<teardown>

This tag contains cleanup code that is run after all test cases. Operations inside this tag are run after every test case is executed. This is used to restore PDS or a workbook to its default state to remove dependencies between independent test cases.

Example operations:

  • Set measure values back to their initial state.

  • Run batch scripts to remove any test-specific files that were generated.

<testcase>

This tag is where the code to perform each test goes. It should perform operations, then use the assert tags to verify the results. The name of this tag is used in the output to log timing results and success/failure. Note: Code in the <setup> tag is executed prior to each test case, and code in the <teardown> tag is executed after each test case.


Some tags handle access to an Oracle SQL database. These tag require an access role name.The tag testsuite has an optional attribute role used to set the database access role. Valid database role values are data_mart, patch, batch, dimload, factload, hiermgr, wkbk, rdonly, etl, report, and bdi.

The role assigned to the testsuite tag affects all test cases, and if no role is assigned to once, setup, and teardown, the role assigned to the testsuite tag will affect these tags as well. A role assigned to the once tag is applied to the tags contained in once, and if no role is assigned to setup and teardown, then this role will apply to these tags as well. A role assigned to the setup tag is applied to the tags contained in setup, and if no role is assigned to teardown, then this role will apply to teardown as well. A role assigned to the teardown tag only applies to the tags contain in teardown.

If a role is required for a test suite and the test suite does not have a valid role attribute, then RPAC will throw an error.

It is recommended that the teardown section restore the application to its previous state. This removes dependencies between test cases and ensures consistency from one run to the next.

The tags once, setup, and teardown are unique. Only the first occurrence of each of these tags is used. These tags can appear in any order under the testsuite tag, and all of these tags are optional. The code contained in these tags is executed at a set point during the run of unit test code. However, for the tag testcase, the order of occurrence in the testsuite is the order of execution.

Example

This section provides a sample XML file that contains some rpac tests that run against an MFP application. This test illustrates how the setup and teardown methods work, as well as how to use the various workbook operations.

The first test case demonstrates building the workbook. The test makes the wizard selections and builds the workbook. Once the workbook is built, an assertion verifies that the load rules correctly set the workbook value.

Once this test case is complete, the teardown code is executed, along with the setup code for the next test case. The test verifies that the teardown code correctly set the workbook's measure value to false and then issues a commit. Once the workbook is committed, the measure value is checked to see if it was properly updated. Once again, the teardown code is executed and the setup code is run at the beginning of the next test case.

For the third test case, the setup code should have initialized the measure value back to true, and the workbook value back to false. The test case verifies these operations, then performs a workbook refresh and verifies that the workbook value has been correctly set to true.

After that, the workbook is closed and the test suite is complete.


Note:

Because the teardown code modifies workbook data, the workbook close step cannot be encapsulated inside of a test case. If it was, the teardown code would try to modify a workbook that was no longer there and produce a failing result.

<testsuite name="Workbook Operations Tags" role="wkbk">
   <once>
      <rpas-today>20070122</rpas-today>
   </once>

   <finalize>
      <workbook-operations>
         <close/>
      </workbook-operations>
   </finalize>

   <!-- Setup executed at the beginning of every testcase -->
   <setup>
     <set-application-measure name="[MEAS]" namedkeys="[NKEY]" value="true"/>
   </setup>

   <!-- Teardown executed at the end of every testcase -->
   <teardown>
     <edit-workbook-measure name="[MEAS]" namedkeys="[NKEY]" value="false"/>
   </teardown>

   <testcase name="Workbook Build"> 
      <!-- Build Merch Plan workbook -->
      <workbook-operations>
         <build template-name="MP_WB" label="Merch Plan" user="adm">
            <wizard-page-settings id="wiz_MP_WBhalf">
               <set-tree-selections control-name="tree1" dim-name="half" rollup-name="half">
                  h1_2022
               </set-tree-selections>
            </wizard-page-settings>
            <wizard-page-settings id="wiz_MP_WBchnl">
               <set-tree-selections control-name="tree1" dim-name="chnl" rollup-name="chnl">
                  1
               </set-tree-selections>
            </wizard-page-settings>
            <wizard-page-settings id="wiz_MP_WBdept">
               <set-tree-selections control-name="tree1" dim-name="dept" rollup-name="dept" >
                  300
               </set-tree-selections>
            </wizard-page-settings>
         </build>
      </workbook-operations>
      <!-- Validate the load rule worked correctly -->
      <assert-workbook-measure-value-eq name="[MEAS]" namedkeys="[NKEY]" value="true"/>
</testcase>

<!-- Commit the workbook and assert the measure values in pds-->
<testcase name="Enable OP Approval Workbook: Commit">
   <assert-application-measure-value-eq name="[MEAS]" namedkeys="[NKEY]" value="true"/>
   <assert-workbook-measure-value-eq name="[MEAS]" namedkeys="[NKEY]" value="false"/>
   <workbook-operations>
      <commit type ="now" template-name="EnableOp" user="adm"/>
   </workbook-operations>
   <!-- Validate the commit rule worked correctly -->
   <assert-application-measure-value-eq name="[MEAS]" namedkeys="[NKEY]" value="false"/>
</testcase>

<!-- Refresh the workbook and assert measure values in workbook and pds-->
<testcase name="Enable OP Approval Workbook: Refresh">
   <assert-application-measure-value-eq name="[MEAS]" namedkeys="[NKEY]" value="true"/>
   <assert-workbook-measure-value-eq name="[MEAS]" namedkeys="[NKEY]" value="false"/>
   <workbook-operations>
      <refresh user="adm"/>
   </workbook-operations>
   <!-- Validate the refresh rule worked correctly -->
   <assert-workbook-measure-value-eq name="[MEAS]" namedkeys="[NKEY]" value="true"/>
</testcase>
</testsuite>
</testsuite>

Output

The rpac command now has a switch to create an HTML document of its tags and their usage. The HTML document rpac.html for RPAC is contained in the RPAS_HOME/doc/rpac directory.

When RPAC executes, it prints the status of the current execution to the console. Once all the test cases are complete, the summary of test cases is stored in unittest.log and unittest.xml under the current directory. The content of this simple text file unittest.log for a working example will be:

ran   3 tests:   0 skips:   0 errors,   0 failures in 1 minute 9.92 seconds for RPAC (LDIP): RPAS_UT Tests

And for unittest.xml:

<unittest elapsedTime="1 minute 9.92 seconds" name="RPAC (LDIP): RPAS_UT Tests" os="Windows" runcount="3" timestamp="2018-11-16 11:17:29" version="18.0.002.00.001">
</unittest>

If something goes wrong the output for unittest.log will be:

ran   3 tests:   0 skips:   1 errors,   0 failures in 1 minute 9.20 seconds for RPAC (LDIP): RPAS_UT Tests

Errors:
  TestName:  MFP RPAC Test 11.Enable OP Approval Workbook: Commit
  Exception: TestCase got OciNamedException: Test/testcases/rpac.xml at line     19 for suite 'MFP RPAC Test 11'.
throw at line 414 of file 'd:\usr\rpas\edgetrunk\rpas\11\libraries\rpassql\rpas\private\sqlsession.cpp'
  Location:    90  'testcases/rpac.xml'

And for unittest.xml:

<unittest elapsedTime="1 minute 9.20 seconds" name="RPAC (LDIP): RPAS_UT Tests" os="Windows" runcount="3" timestamp="2018-11-16 12:01:03" version="18.0.002.00.001">
  <errorlist>
     <error>
        <testname>MFP RPAC Test 11.Enable OP Approval Workbook: Commit</testname>
        <exception>TestCase got OciNamedException: Test/testcases/rpac.xml at line     19 for suite &apos;MFP RPAC Test 11&apos;.
throw at line 414 of file &apos;d:\usr\rpas\edgetrunk\rpas\11\libraries\rpassql\rpas\private\sqlsession.cpp&apos;</exception>
        <file>testcases/rpac.xml</file>
        <line>90</line>
     </error>
  </errorlist>
</unittest>

Schema

This section provides schema details.

RPAC Attributes, Values, and Variables

All HTML tags may contain attributes and values. RPAC does an initial processing of the attributes and tag value strings. This initial processing replaces any occurrence of the string enclosed with square brackets with the current variable matching the enclosed string. For example the string "Rpas Today is [RPAS_TODAY]" would be replace with "Rpas Today is 20180802" if either the process environmental variable "RPAS_TODAY" had the value of "20180802" or the RPAC tag "set-environment-variable" had been used to set the variable "RPAS_TODAY" to the value of "20180802".

There are environment variables internal to RPAC "[RPAC_DATE]", "[RPAC_DATA]", "[RPAC_WORK]", "[RPAC_TEST_SUITE]", "[RPAC_TEST_CASE]", "[PLATFORM]", "[PDS_PATH]", "[PDS_NAME]", "[PDS_ID]", "[SEGMENT_ID]", "[WORKBOOK_NAME]" and "[TASK_ID]".

These internal environment variables cannot be change using the RPAC tag set-environment-variable. And these variables are not normally exported to any processes RPAC is requested to start. For a process that RPAC is requested to start to see any internal RPAC variables use the set-environment-variable. For example:

<set-environment-variable name="RPAC_PDS_PATH" value="[PDS_PATH]" export="true"/>

This tag will export the internal "PDS_PATH" to the environmental variable "RPAC_PDS_PATH".

The internal environment variable "[RPAC_DATE]" always returns the current date/time as a string value. The format of the data time string can be changed using the RPAC tag "set-date-format". The default format is "%Y%m%d".

The internal environment variable "[RPAC_DATA]" is the location of the input directory known to RPAC.

The internal environment variable "[RPAC_WORK]" is the location of the output directory known to RPAC.

The internal environment variable "[RPAC_TEST_SUITE]" is name of the current test suite.

The internal environment variable "[RPAC_TEST_CASE]" is name of the current test case.

The internal environment variable "[PDS_PATH]" is the location of the PDS directory.

The internal environment variable "[PDS_NAME]" is the application name for PDS.

The internal environment variable "[PDS_ID]" is the application id for PDS.

The internal environment variable "[DEPLOY_ID]" is the deploy id for PDS.

The internal environment variable "[PLATFORM]" contains either the string "Windows" or the string "Linux" base on the platform RPAC is running on.

The internal environment variable "[SEGMENT_ID]" is segment id of the last workbook build.

The internal environment variable "[WORKBOOK_NAME]" is name of the current workbook or blank if there is no current workbook.

The internal environment variable "[TASK_ID]" is the current task Id of the last task started.

The internal variables "[WORKBOOK_NAME]", and "[SEGMENT_ID]" will be updated after workbook "build" tag is executed.

The internal variables "[TASK_ID]" will be updated after RPAC starts any tasks.

The "set-environment-variable" can be used to copy one environment variable into another environment variable.

1. RPAC Structure Tag

This section provides details about the top-level parent tag.

1.1 testscript

The testscript is the top-level tag, which contains all the rpac tags.

1.2 testsuite

The testsuite contains setup, teardown, and testcase tag elements.

Table 14-2 Testsuite

Attribute Required Description

name

Yes

Name of the test suite

role

No

Role of the test suite

category

No

Category name; light, normal, intense, performance, or debug

stop-on-failure

No

Boolean to indicate if test suite should exit when error or failure occurs (Defaults to false)

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


1.3 testcase

The testcase contains a list of tag elements to be executed.

Table 14-3 Testcase

Attribute Required Description

name

Yes

Name of the test case

category

No

Category name; light, normal, intense, performance, or debug

exception

No

Expected exception

role

No

Role of the contain tags (defaults to role of testSuite)

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


1.4 once

The once tag contains tag elements used to set up the environment once before the first test case is executed.

Table 14-4 Once

Attribute Required Description

role

No

Role of the contain tags (defaults to role of testSuite)

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<once> 
   <set-environment-variable name="DBPATH" value="data/rpacTest"/>
</once>

1.5 finalize

The finalize tag contains tag elements used to restore the environment after the final test case is executed.

Table 14-5 Finalize

Attribute Required Description

role

No

Role of the contain tags (defaults to role of testSuite)

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


1.6 setup

The setup tag contains tag elements used to set up the environment before each test case is executed.These can include initializing measure values, setting the date, or running batch scripts to prepare the application.

Table 14-6 Setup

Attribute Required Description

role

No

Role of the contain tags (defaults to role of testSuite)

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


1.7 teardown

The teardown tag contains tag elements used to restore the environment to a default state after each test case is executed. This can include returning measures to their default values or running batch scripts to clean up the application.

Table 14-7 Teardown

Attribute Required Description

role

No

Role of the contain tags (defaults to role of testSuite)

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


2. Application Measure Tags

This section provides details about application measure tags.

2.1 assert-application-measure-exists

This tag asserts an application measure exists.

Table 14-8 assert-application-measure-exists

Attribute Required Description

name

Yes

Application measure name

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<assert-application-measure-exists name="[mpwpgmmx]"/>

2.2 assert-application-measure-intx

This tag asserts a application measure base intersection matches an expected value.

Table 14-9 assert-application-measure-intx

Attribute Required Description

name

Yes

Application measure name

intx

Yes

Intersection string to compare with

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<assert-application-measure-intx name="[mpwpgmmx]" intx="chnlscls"/>

2.3 assert-application-measure-value-eq

This tag asserts a application measure value is equal to an expected value.

Table 14-10 assert-application-measure-value-eq

Attribute Required Description

name

Yes

Application measure name

value

No

Expected value of application measure. (Defaults to NA). Date value must be provided in one of six formats '%Y%m%d%H%M%S', '%Y%m%d%H%M', '%Y%m%d', '%m/%d/%Y %H:%M:%S', '%m/%d/%Y %H:%M', or '%m/%d/%Y'. For boolean measure valid values are 't' or 'true' of any case while all other values are false.

precision

No

The number of decimal places to be considered for assertion

namedkeys

No

List of colon separated position names

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<testcase>
    <assert-application-measure-value-eq name="r_ex_demoa" namedkeys="w02_2009,w03_2009,w04_2009:dept03:str1000" value="10"/>
</testcase>

2.4 assert-application-measure-value-ge

This tag asserts a application measure value is greater than or equal to an expected value.

Table 14-11 assert-application-measure-value-ge

Attribute Required Description

name

Yes

Application measure name

value

No

Expected value of application measure. (Defaults to NA). Date value must be provided in one of six formats '%Y%m%d%H%M%S', '%Y%m%d%H%M', '%Y%m%d', '%m/%d/%Y %H:%M:%S', '%m/%d/%Y %H:%M', or '%m/%d/%Y'. For boolean measure valid values are 't' or 'true' of any case while all other values are false.

precision

No

The number of decimal places to be considered for assertion

namedkeys

No

List of colon separated position names

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<assert-application-measure-value-ge name="r_ex_demoa" namedkeys="w02_2009,w03_2009,w04_2009:dept03:str1000" val

2.5 assert-application-measure-value-gt

This tag asserts a application measure value is greater than an expected value.

Table 14-12 assert-application-measure-value-gt

Attribute Required Description

name

Yes

Application measure name

value

No

Expected value of application measure. (Defaults to NA). Date value must be provided in one of six formats '%Y%m%d%H%M%S', '%Y%m%d%H%M', '%Y%m%d', '%m/%d/%Y %H:%M:%S', '%m/%d/%Y %H:%M', or '%m/%d/%Y'. For boolean measure valid values are 't' or 'true' of any case while all other values are false.

precision

No

The number of decimal places to be considered for assertion

namedkeys

No

List of colon separated position names

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<assert-application-measure-value-gt name="r_ex_demoa" namedkeys="w02_2009,w03_2009,w04_2009:dept03:str1000" value="10"/>

2.6 assert-application-measure-value-le

This tag asserts a application measure value is less than or equal to an expected value.

Table 14-13 assert-application-measure-value-le

Attribute Required Description

name

Yes

Application measure name

value

No

Expected value of application measure. (Defaults to NA). Date value must be provided in one of six formats '%Y%m%d%H%M%S', '%Y%m%d%H%M', '%Y%m%d', '%m/%d/%Y %H:%M:%S', '%m/%d/%Y %H:%M', or '%m/%d/%Y'. For boolean measure valid values are 't' or 'true' of any case while all other values are false.

precision

No

The number of decimal places to be considered for assertion

namedkeys

No

List of colon separated position names

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<assert-application-measure-value-le name="r_ex_demoa" namedkeys="w02_2009,w03_2009,w04_2009:dept03:str1000" value="10"/>

2.7 assert-application-measure-value-lt

This tag asserts a application measure value is less than an expected value.

Table 14-14 assert-application-measure-value-lt

Attribute Required Description

name

Yes

Application measure name

value

No

Expected value of application measure. (Defaults to NA). Date value must be provided in one of six formats '%Y%m%d%H%M%S', '%Y%m%d%H%M', '%Y%m%d', '%m/%d/%Y %H:%M:%S', '%m/%d/%Y %H:%M', or '%m/%d/%Y'. For boolean measure valid values are 't' or 'true' of any case while all other values are false.

precision

No

The number of decimal places to be considered for assertion

namedkeys

No

List of colon separated position names

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<assert-application-measure-value-lt name="r_ex_demoa" namedkeys="w02_2009,w03_2009,w04_2009:dept03:str1000" value="10"/>

2.8 assert-application-measure-value-ne

This tag asserts a application measure value is not equal to an expected value.

Table 14-15 assert-application-measure-value-ne

Attribute Required Description

name

Yes

Application measure name

value

No

Expected value of application measure. (Defaults to NA). Date value must be provided in one of six formats '%Y%m%d%H%M%S', '%Y%m%d%H%M', '%Y%m%d', '%m/%d/%Y %H:%M:%S', '%m/%d/%Y %H:%M', or '%m/%d/%Y'. For boolean measure valid values are 't' or 'true' of any case while all other values are false.

precision

No

The number of decimal places to be considered for assertion

namedkeys

No

List of colon separated position names

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<assert-application-measure-value-ne name="r_ex_demoa" namedkeys="w02_2009,w03_2009,w04_2009:dept03:str1000"/>

2.9 assert-application-measures-match

This tag asserts application measures have matching content. The content of this tag can limit the comparison to a sub-set of the measure data. The format is DimName0:dim0pos0,dim0pos1,dim0pos3|DimName1:dim1pos0. Which is N number of dimension/positions lines with a vertical bar separator. Each dimension/positions lines has a dimension name followed by a colon separator and N position names with a comma separator between each name. This is an optional value.

Table 14-16 assert-application-measures-match

Attribute Required Description

lhs-measure

Yes

LHS measure used for comparison

rhs-measure

Yes

RHS measure used for comparison

output-file

No

Output file name containing list of differences (Defaults to unique name base on tag line number and xml file name containing tag).

max-diffs

No

Maximum number of differences allow before stopping match (defaults to 32)

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<testcase>
   <assert-application-measures-match lhs-measure="rm1" rhs-measure="rm2">
      week:w45_2009,w46_2009,w47_2009|sku:sku_22200001,sku_22200002
   </assert-application-measures-match>
   <assert-application-measures-match lhs-measure="rm1" rhs-measure="rm2"/>
</testcase>

2.10 assert-application-popcount-value-eq

This tag asserts a application pop count is equal to an expected value.

Table 14-17 assert-application-popcount-value-eq

Attribute Required Description

name

Yes

Application measure name

pop-count

No

Expected popcount (Defaults to zero)

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<assert-application-popcount-value-eq name="r_ex_demoa" pop-count="1"/>

2.11 assert-application-popcount-value-ge

This tag asserts a application pop count is greater than or equal to an expected value.

Table 14-18 assert-application-popcount-value-ge

Attribute Required Description

name

Yes

Application measure name

pop-count

No

Expected popcount (Defaults to zero)

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<assert-application-popcount-value-ge name="r_ex_demoa" pop-count="1"/>

2.12 assert-application-popcount-value-gt

This tag asserts a application pop count is greater than an expected value.

Table 14-19 assert-application-popcount-value-gt

Attribute Required Description

name

Yes

Application measure name

pop-count

No

Expected popcount (Defaults to zero)

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<assert-application-popcount-value-gt name="r_ex_demoa" pop-count="1"/>

2.13 assert-application-popcount-value-le

This tag asserts a application pop count is less than or equal to an expected value.

Table 14-20 assert-application-popcount-value-le

Attribute Required Description

name

Yes

Application measure name

pop-count

No

Expected popcount (Defaults to zero)

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<assert-application-popcount-value-le name="r_ex_demoa" pop-count="1"/>

2.14 assert-application-popcount-value-lt

This tag asserts a application pop count is less than an expected value.

Table 14-21 assert-application-popcount-value-lt

Attribute Required Description

name

Yes

Application measure name

pop-count

No

Expected popcount (Defaults to zero)

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<assert-application-popcount-value-lt name="r_ex_demoa" pop-count="1"/>

2.15 assert-application-popcount-value-ne

This tag asserts a application pop count is not equal to an expected value.

Table 14-22 assert-application-popcount-value-ne

Attribute Required Description

name

Yes

Application measure name

pop-count

No

Expected popcount (Defaults to zero)

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<assert-application-popcount-value-ne name="r_ex_demoa" pop-count="1"/>

2.16 set-application-measure

This tag set the value of a application measure based on provided attributes.

Table 14-23 set-application-measure

Attribute Required Description

name

Yes

Application measure name

value

No

Value to set application measure value to. (Defaults to NA). Date value must be provided in one of six formats '%Y%m%d%H%M%S', '%Y%m%d%H%M', '%Y%m%d', '%m/%d/%Y %H:%M:%S', '%m/%d/%Y %H:%M', or '%m/%d/%Y'. For boolean measure valid values are 't' or 'true' of any case while all other values are false.

keyint

No

Intersection of namedKey attribute if not provided intersection of namedKey is base intersection of the measure.

namedkeys

No

List of colon separated position specs. There must be one position specs for each dimension of the measure. A position specs is a comma separate list of sub-specs. A sub-spec can be a position name, a range of position names like 'w01_1997-w18_1997', or an asterisk. An asterisk '*' indicates all positions of the given dimension will be used. A position name can be replace with a position index.

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<testcase>
   <set-application-measure name="r_ex_demoa" namedkeys="w02_2009,w03_2009,w04_2009:dept03:str1000" value="10"/>
   <set-application-measure name="r_ex_demob" namedkeys="w02_2009-w04_2009:dept03:str1000" value="10"/>
   <set-application-measure name="r_ex_democ" namedkeys="w02_2009-w04_2009:*:str1000" value="10"/>
   <set-application-measure name="r_ex_democ" namedkeys="w02_2009-w04_2009:*:str1001"/>
</testcase>

2.17 register-measure

This tag registers a measure with the provided properties to the current store either a workbook or application PDS table.

Table 14-24 register-measure

Attribute Required Description

name

Yes

Measure name

type

No

Type of measure (Defaults to real). Acceptable values are int, real, string, date, or boolean.

intx

No

Base intersection

defagg

No

Default aggregation method

naval

No

Value to set the measure NaValue. (Defaults to NA). Date value must be provided in one of six formats '%Y%m%d%H%M%S', '%Y%m%d%H%M', '%Y%m%d', '%m/%d/%Y %H:%M:%S', '%m/%d/%Y %H:%M', or '%m/%d/%Y'. For boolean measure valid values are 't' or 'true' of any case while all other values are false.

fnhbi

No

Force non HBI measure (Defaults to false)

dbpath

No

Database path of measure (Defaults to 'data/rpac')

basestate

No

Base state of measure (Defaults to none)

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<testcase>
   <set-environment-variable name="MEAS0" value="tst_int"/>
   <set-environment-variable name="MEAS1" value="tst_real"/>
   <set-environment-variable name="MEAS2" value="tst_string"/>
   <set-environment-variable name="MEAS3" value="tst_date"/>
   <set-environment-variable name="MEAS4" value="tst_boolean"/>
   <set-environment-variable name="INTX" value="str_week"/>
   <register-measure name="[MEAS0]" type="int"     intx="[INTX]" basestate="write" naval="0"/>
   <register-measure name="[MEAS1]" type="real"    intx="[INTX]" basestate="write" naval="0"/>
   <register-measure name="[MEAS2]" type="string"  intx="[INTX]" basestate="write" naval="Test"/>
   <register-measure name="[MEAS3]" type="date"    intx="[INTX]" basestate="write"/>
   <register-measure name="[MEAS4]" type="boolean" intx="[INTX]" basestate="write"/>
</testcase>

2.18 unregister-measure

This tag unregisters a measure from the current store either a workbook or from the application PDS meta table.

Table 14-25 unregister-measure

Attribute Required Description

name

Yes

Measure name

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<testcase>
   <set-environment-variable name="MEAS0" value="tst_int"/>
   <set-environment-variable name="MEAS1" value="tst_real"/>
   <unregister-measure name="[MEAS0]"/>
   <unregister-measure name="[MEAS1]"/>
   <unregister-measure name="test_measure"/>
</testcase>

2.19 unregister-measures

This tag unregisters a list of measures from the current store either a workbook or from the application PDS meta table.

Table 14-26 unregister-measures

Attribute Required Description

name

Yes

List of measure names

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


2.20 get-measure-property

This tag gets property for given measure. Valid properties are ('factname', 'factgroup', 'facttable', 'baseintx', 'aggMethod', 'navalue', 'rpastype', or 'materialized'). Any property that is an empty string will be show as the string constant 'Blank'.

Table 14-27 get-measure-property

Attribute Required Description

measure-name

Yes

Name of measure to get property for

property

Yes

Name of property to get fetch valid values ('factname', 'factgroup', 'facttable', 'baseintx', 'aggMethod', 'navalue', 'rpastype', or 'materialized')

variable

Yes

Name of variable to update with property value

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


2.21 clear-application-measure-list

This tag clears a list of application measures of all data. Must provide either the attribute 'filename' where the list of measures is contain in a file. Or the attribute 'measures' where the value of the attribute is a comma separated list measures names.

Table 14-28 clear-application-measure-list

Attribute Required Description

filename

No

Filename of file containing application measures names

measures

No

Comma separated list of application measure names

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<clear-application-measure-list measures="rm1,rm2"/>

2.22 clear-application-measure

This tag clears a application measure of all data.

Table 14-29 clear-application-measure

Attribute Required Description

name

Yes

Application measure name

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<clear-application-measure name="r_ex_pick_real" />

2.23 backup-appl-measure

This tag backs up an application measure fact table data to the CSV backup file contained in the PDS directory.

Table 14-30 backup-appl-measure

Attribute Required Description

measure-name

Yes

Measure name

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<testcase>
   <backup-appl-measure  measure-name="[MEAS1]"/>
</testcase>

2.24 dump-appl-measure

This tag dumps an application measure data to a CSV file.

Table 14-31 dump-appl-measure

Attribute Required Description

measure-name

Yes

Measure name

csv-path

Yes

Path of CSV file to dump measure data into. A relative path value uses the RPAC work directory.

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<testcase>
   <dump-appl-measure  measure-name="[MEAS1]" csv-path="measure1.csv"/>
</testcase>

2.25 load-appl-measure

This tag loads an application measure data to a CSV file.

Table 14-32 load-appl-measure

Attribute Required Description

measure-name

Yes

Measure name

csv-path

Yes

Path of CSV file to dump measure data into. A relative path value uses the RPAC work directory.

overlay

No

When true overlay data into fact table. (defaults to false).

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<testcase>
   <load-appl-measure  measure-name="[MEAS1]" csv-path="measure1.csv"/>
</testcase>

2.26 restore-all-appl-measure

This tag restores all application measures fact tables data from backup files contained in the PDS directory

Table 14-33 restore-all-appl-measure

Attribute Required Description

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<testcase>
   <restore-all-appl-measures/>
</testcase>

3. Dimension Tags

This section provides details about the Dimension tags.

3.1 assert-hier-exists

This tag asserts a hierarchy exists.

Table 14-34 assert-hier-exists

Attribute Required Description

name

Yes

Hierarchy name

exists

Yes

If flag is true then check if hierachy exist (Defaults to true)

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<assert-hier-exists name="prod" exists="true"/>

3.2 assert-dimension-contain

This tag asserts a dimension contains or does not contain a position name.

Table 14-35 assert-dimension-contain

Attribute Required Description

name

Yes

Dimension name

posname

Yes

List of comma separated position names

containflag

Yes

If flag is true then position names are checked to see if they are contained in the dimension

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<assert-dimension-contain name="scls" posname="10000001" containflag="true"/>

3.3 assert-dimension-exists

This tag asserts a dimension name exists.

Table 14-36 assert-dimension-exists

Attribute Required Description

name

Yes

Hierarchy name

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<assert-dimension-exists name="dim"/>

3.4 assert-dimension-size

This tag asserts a dimension size is between a minimum and a maximum value.

Table 14-37 assert-dimension-size

Attribute Required Description

name

Yes

Dimension name

min

Yes

Minimum value

max

Yes

Maximum value

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<assert-dimension-size name="dim" min="10" max="100"/>

4. Directory and File Tags

This section provides details about the Directory and File tags.

4.1 assert-directory-does-not-exists

This tag asserts that a directory does not exists.

Table 14-38 assert-directory-does-not-exists

Attribute Required Description

path

Yes

Path of directory to verify does not exists

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<assert-directory-does-not-exists path="[PDS_PATH]/emptyDir" />

4.2 assert-directory-exists

This tag asserts that a directory exists.

Table 14-39 assert-directory-exists

Attribute Required Description

path

Yes

Path of directory to verify does not exists

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<testcase>
   <set-environment-variable name="INPUT"     value="[PDS_PATH]/input"/>
   <set-environment-variable name="PROCESSED" value="[INPUT]/processed"/>
   <assert-directory-exists path="[PROCESSED]"/></testcase>

4.3 assert-directory-is-empty

This tag asserts that a directory exists and contain no files.

Table 14-40 assert-directory-is-empty

Attribute Required Description

path

Yes

Path of directory to verify does not exists

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<testcase> 
   <set-environment-variable name="TESTDIR" value="[RPAC_WORK]/emptyDir"/>
   <assert-directory-is-empty path="[TESTDIR]"/>
</testcase>

4.4 assert-directory-structure

This tag asserts that a directory exists and has a certain directory structure. The value of the tag contains the expected directory structure. Each line of the directory structure must use a vertical bar '|' between lines. The path attribute is the location of the directory structure.

Table 14-41 assert-directory-structure

Attribute Required Description

path

Yes

Path of directory to verify does not exists

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<assert-directory-structure path="[RPAC_WORK]/rdm">
   tasks/ |
   tasks/booking/ |
   tasks/pending/ |
   tasks/working/ |
   tasks/working/test.log
</assert-directory-structure>

4.5 assert-file-contains

This tag asserts range of N:M occurrences of text are contain in a file. Must provide either 'text' attribute, 'text-from-file' attribute or tag value. If 'text' attribute is provided then the value of the attribute will be split base on the separator attribute. If 'text-from-file' attribute is provide then each line is a separate pattern. If tag value is provide then each line of the tag value will be a separate pattern.

Table 14-42 assert-file-contains

Attribute Required Description

path

Yes

File path of file to search

range

Yes

Range of number of occurrences to expect. IE 4:6 indicates at least four and up to and including six occurrences

test

No

Text patterns to search for, if separator is provided the text string is split into different patterns

text-from-file

No

File path containing text patterns to search for. Each line of the file being a pattern

erase

No

Erase file if assert is valid (defaults to true)

case-sensitive

No

Case sensitive (defaults to false)

separator

No

Separator to use (defaults to "|"), use "none" if text does not need to be split

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<testsuite name="example" role="batch">
   <once>
      <set-environment-variable name="PATTERNS1" value="[PLATFORM]/patterns1.txt"/>
      <set-environment-variable name="MACE_CMD"  value="mace -d [SANDBOX] -run -expression"/>
   </once>

   <testcase name="Test 1">
      <shell unique-file="LOG_PATH">
         [MACE_CMD] "rpacMeasure = if(rpacMaskMeasure, rand(123, 170), 0)"
      </shell>
      <assert-file-contains path="[LOG_PATH]" erase="false" range="1:1" text-from-file="[PATTERNS1]"/>
      <assert-file-contains path="[LOG_PATH]" erase="true"  range="1:8" text="IllegalParse"/>
   </testcase>
</testsuite>

4.6 assert-file-does-not-exists

This tag asserts that a file does not exists.

Table 14-43 assert-file-does-not-exists

Attribute Required Description

path

Yes

Path of file to verify does not exists

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<testcase>
   <set-environment-variable name="INPUT"     value="[PDS_PATH]/input"/>
   <set-environment-variable name="PROCESSED" value="[INPUT]/processed"/>
   <assert-file-does-not-exists path="[INPUT]/prod.dat"/>
   <assert-file-does-not-exists path="[PROCESSED]/users.xml"/>
</testcase>

4.7 assert-file-exists

This tag asserts that a file exists.

Table 14-44 assert-file-exists

Attribute Required Description

path

Yes

Path of file to verify does not exists

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<testcase>
   <set-environment-variable name="INPUT"     value="[PDS_PATH]/input"/>
   <set-environment-variable name="PROCESSED" value="[INPUT]/processed"/>
   <assert-file-does-not-exists path="[INPUT]/prod.dat"/>
   <assert-file-does-not-exists path="[PROCESSED]/users.xml"/>
   <assert-directory-exists   path="[PROCESSED]"/>
   <assert-file-exists        path="[PROCESSED]/msgs.dat.20190822004042"/>
</testcase>

4.8 assert-file-is-empty

This tag asserts that a file exists and contain no data.

Table 14-45 assert-file-is-empty

Attribute Required Description

path

Yes

Path of file to verify does not exists

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<testcase>
   <set-environment-variable name="TESTTXTFILE" value="[RPAC_WORK]/emptyDir/test.txt"/>
   <assert-file-is-empty path="[TESTTXTFILE]"/>
</testcase>

4.9 assert-file-is-read-lock

This tag asserts the given file is read locked.

Table 14-46 assert-file-is-read-lock

Attribute Required Description

path

Yes

Path of file to verify does not exists

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<testcase>
   <set-environment-variable name="TESTLCKFILE" value="[RPAC_WORK]/emptyDir/test.lck"/>
   <read-lock-file path="[TESTLCKFILE]"/>
   <assert-file-is-read-lock path="[TESTLCKFILE]"/>
</testcase>

4.10 assert-file-is-write-lock

This tag asserts the given file is write locked.

Table 14-47 assert-file-is-write-lock

Attribute Required Description

path

Yes

Path of file to verify does not exists

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


<testcase>  
   <set-environment-variable name="TESTLCKFILE" value="[RPAC_WORK]/emptyDir/test.lck"/>
   <write-lock-file path="[TESTLCKFILE]"/>
   <assert-file-is-write-lock path="[TESTLCKFILE]"/>
</testcase>

4.11 compare-file-content

This tag compares content of file to xml data.

Table 14-48 compare-file-content

Attribute Required Description

path

Yes

Path of file content is to be compare with

erase

No

Erase file if matches content (defaults to true)

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<testcase>
   <set-environment-variable name="MEAS" value="rpacMeasure %s NA NA"/>
   <set-environment-variable name="DIM" value="week 0 %s 1"/>
   <get-unique-file-path name="FILEPATH"/>
   <shell>exportData -d [RPAC_DOMAIN] -meas "[MEAS]" -dim "[DIM]" -out [FILEPATH]</shell>
   <compare-file-content path="[FILEPATH]">
      "w02_2007Test1"|
      "w03_2007Test2"|
      "w04_2007Test3"
   </compare-file-content>
</testcase>

4.12 compare-files

This tag compares content of two files.

Table 14-49 compare-files

Attribute Required Description

input

Yes

Path to input gold file

output

Yes

Path to output file to compare to

ignore-trailing-blank-line

No

Ignore blank lines at end of file (defaults to false)

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<testcase 
   name="Verify working directory attribute works">
   <set-environment-variable name="EXPECTED" value="[RPAC_DATA]/rpas_utilities.txt"/>
   <shell unique-file="[ACTUAL]">ls -l [RPAS_HOME]</shell>   <compare-files input="[EXPECTED]" output="[ACTUAL]"/>
</testcase>

4.13 copy-directory

This tag copy a directory.

Table 14-50 copy-directory

Attribute Required Description

src-path

Yes

Path of directory to be copied

dst-path

Yes

Path to copy directory to

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<testcase>
   <set-environment-variable name="TESTDIR" value="[RPAC_WORK]/emptyDir"/>
   <copy-directory src-path="[TESTDIR]/testDir1" dst-path="[TESTDIR]/testDir2"/>
</testcase>

4.14 copy-file

This tag copy a file.

Table 14-51 copy-file

Attribute Required Description

src-path

Yes

Path of directory to be copied

dst-path

Yes

Path to copy directory to

expand

No

Expand environmental variables (defaults to false)

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<testcase>
  <set-environment-variable name="TESTTXTFILE1" value="[RPAC_WORK]/emptyDir/test1.txt"/>
  <set-environment-variable name="TESTTXTFILE2" value="[RPAC_WORK]/emptyDir/test2.txt"/>
  <copy-file src-path="[TESTTXTFILE1]" dst-path="[TESTTXTFILE2]"/>
</testcase>

4.15 create-directory

This tag creates a directory.

Table 14-52 create-directory

Attribute Required Description

path

Yes

Path of directory to create

create-parent

No

Create parent directory if true (defaults to false)

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<testcase>
   <set-environment-variable name="TESTDIR" value="[RPAC_WORK]/emptyDir"/>
   <create-directory path="[TESTDIR]"/>
</testcase>

4.16 create-file

This tag creates a file.

Table 14-53 create-file

Attribute Required Description

path

Yes

Path of directory to create

create-parent

No

Create parent directory if true (defaults to false)

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<testcase> 
   <set-environment-variable name="TESTTXTFILE" value="[RPAC_WORK]/emptyDir/test.txt"/>
   <create-file path="[TESTTXTFILE]">test</create-file>
</testcase>

4.17 erase-file

This tag erases a file.

Table 14-54 erase-file

Attribute Required Description

path

Yes

Path to output file to erase

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<testcase>
   <set-environment-variable name="TESTTXTFILE" value="[RPAC_WORK]/emptyDir/test.txt"/>
   <erase-file path="[TESTTXTFILE]"/>
</testcase>

4.18 rename-file

This tag renames a file or directory.

Table 14-55 rename-file

Attribute Required Description

src-path

Yes

Old name of file or directory

dst-path

Yes

New name of file or directory

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<testcase>
  <set-environment-variable name="TESTTXTFILE1" value="[RPAC_WORK]/emptyDir/test1.txt"/>
  <set-environment-variable name="TESTTXTFILE2" value="[RPAC_WORK]/emptyDir/test2.txt"/>
  <rename-file src-path="[TESTTXTFILE1]" dst-path="[TESTTXTFILE2]"/>
</testcase>

4.19 remove-directory

This tag removes a directory.

Table 14-56 remove-directory

Attribute Required Description

path

Yes

Path of directory to remove

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<testcase>
  <set-environment-variable name="TESTDIR" value="[RPAC_WORK]/emptyDir"/>
  <remove-directory path="[TESTDIR]"/>
</testcase>

4.20 read-lock-file

This tag attempts to read lock the given file.

Table 14-57 read-lock-file

Attribute Required Description

path

Yes

Path of file being check for lock status

wait-for

No

Number of seconds to wait acquiring lock (Defaults to 2 minutes)

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<testcase>
  <set-environment-variable name="TESTLCKFILE" value="[RPAC_WORK]/emptyDir/test.lck"/>
  <read-lock-file path="[TESTLCKFILE]"/>
</testcase>

4.21 write-lock-file

This tag attempts to write locks the given file.

Table 14-58 write-lock-file

Attribute Required Description

path

Yes

Path of file being check for lock status

wait-for

No

Number of seconds to wait acquiring lock (Defaults to 2 minutes)

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<testcase>
   <set-environment-variable name="TESTLCKFILE" value="[RPAC_WORK]/emptyDir/test.lck"/>
   <write-lock-file path="[TESTLCKFILE]"/>
</testcase>

4.22 unlock-file

This tag attempts to unlock the given file.

Table 14-59 unlock-file

Attribute Required Description

path

Yes

Path of file being check for lock status

wait-for

No

Number of seconds to wait acquiring lock (Defaults to 2 minutes)

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<testcase>
   <set-environment-variable name="TESTLCKFILE" value="[RPAC_WORK]/emptyDir/test.lck"/>
   <unlock-file path="[TESTLCKFILE]"/>
</testcase>

4.23 assert-file-size-eq

This tag asserts the size of the file is equal to an expected value.

Table 14-60 assert-file-size-eq

Attribute Required Description

path

Yes

Path of file to verify size of.

value

No

File size to compare to. (Defaults to zero)

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<once>
   <set-environment-variable name="PATH" value="[RPAC_DATA]/measure1.csv"/>
</once>
<testcase name="Check equal 0">
   <assert-file-size-eq path="[PATH]" value="0"/>
</testcase>

4.24 assert-file-size-ge

This tag asserts the size of the file is greater than or equal to an expected value.

Table 14-61 assert-file-size-ge

Attribute Required Description

path

Yes

Path of file to verify size of.

value

No

File size to compare to. (Defaults to zero)

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<once>
   <set-environment-variable name="PATH" value="[RPAC_DATA]/measure1.csv"/>
</once>

<testcase name="Check greater than or equal 0">
   <assert-file-size-ge path="[PATH]" value="0"/>
</testcase>

4.25 assert-file-size-gt

This tag asserts the size of the file is greater than an expected value.

Table 14-62 assert-file-size-gt

Attribute Required Description

path

Yes

Path of file to verify size of.

value

No

File size to compare to. (Defaults to zero)

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<once>
   <set-environment-variable name="PATH" value="[RPAC_DATA]/measure1.csv"/>
</once>

<testcase name="Check greater than 0">
   <assert-file-size-gt path="[PATH]" value="0"/>
</testcase>

4.26 assert-file-size-le

This tag asserts the size of the file is less than or equal to an expected value.

Table 14-63 assert-file-size-le

Attribute Required Description

path

Yes

Path of file to verify size of.

value

No

File size to compare to. (Defaults to zero)

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<once>
   <set-environment-variable name="PATH" value="[RPAC_DATA]/measure1.csv"/>
</once>

<testcase name="Check less than or equal 0">
   <assert-file-size-le path="[PATH]" value="0"/>
</testcase>

4.27 assert-file-size-lt

This tag asserts the size of the file is less than an expected value.

Table 14-64 assert-file-size-lt

Attribute Required Description

path

Yes

Path of file to verify size of.

value

No

File size to compare to. (Defaults to zero)

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<once>
   <set-environment-variable name="PATH" value="[RPAC_DATA]/measure1.csv"/>
</once>

<testcase name="Check less than 0">
   <assert-file-size-lt path="[PATH]" value="0"/>
</testcase>

4.28 assert-file-size-ne

This tag asserts the size of the file is not equal to an expected value.

Table 14-65 assert-file-size-ne

Attribute Required Description

path

Yes

Path of file to verify size of.

value

No

File size to compare to. (Defaults to zero)

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<once>
   <set-environment-variable name="PATH" value="[RPAC_DATA]/measure1.csv"/>
</once>

<testcase name="Check not equal 0">
   <assert-file-size-ne path="[PATH]" value="0"/>
</testcase>

5. Sql Query Tags

This section describes the SQL Query tags.

5.1 assert-sql-query-eq

This tag asserts the SQL query value is equal to an expected value.

Table 14-66 assert-sql-query-eq

Attribute Required Description

value

Yes

Expected value

type

Yes

Must provide type of value as one of these strings 'string', 'slong32', or 'double'

commit

No

True if the SQL query should be committed (defaults to false)

nullable

No

True if the SQL query results could be null (defaults to false)

bind-name

No

Provides a name for store procedure query like 'begin rp_xx_pkg.get_name(:name); end;'. For this call the parameter must be set to ':name'.

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<testcase 
   name="assert-sql-query-eq">
   <set-environment-variable name="QUERY" value="select count(*) from rp_g_scls_d where scls='10000001'"/>
   <assert-sql-query-eq value="1" type="slong32">
    [QUERY]
   </assert-sql-query-eq>
</testcase>

5.2 assert-sql-query-ge

This tag asserts the SQL query value is greater than or equal to an expected value.

Table 14-67 assert-sql-query-ge

Attribute Required Description

value

Yes

Expected value

type

Yes

Must provide type of value as one of these strings 'string', 'slong32', or 'double'

commit

No

True if the SQL query should be committed (defaults to false)

nullable

No

True if the SQL query results could be null (defaults to false)

bind-name

No

Provides a name for store procedure query like 'begin rp_xx_pkg.get_name(:name); end;'. For this call the parameter must be set to ':name'.

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<testcase 
   name="assert-sql-query-ge eq case">
   <set-environment-variable name="QUERY" value="select count(*) from rp_g_scls_d where scls='10000001'"/>
   <assert-sql-query-ge value="1" type="slong32">
    [QUERY]
   </assert-sql-query-ge>
 </testcase>

5.3 assert-sql-query-gt

This tag asserts the SQL query value is greater than an expected value.

Table 14-68 assert-sql-query-gt

Attribute Required Description

value

Yes

Expected value

type

Yes

Must provide type of value as one of these strings 'string', 'slong32', or 'double'

commit

No

True if the SQL query should be committed (defaults to false)

nullable

No

True if the SQL query results could be null (defaults to false)

bind-name

No

Provides a name for store procedure query like 'begin rp_xx_pkg.get_name(:name); end;'. For this call the parameter must be set to ':name'.

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<testcase 
   name="assert-sql-query-gt">
   <set-environment-variable name="QUERY" value="select count(*) from rp_g_scls_d where scls='10000001'"/>
   <assert-sql-query-gt value="0" type="slong32">
    [QUERY]
   </assert-sql-query-gt>
</testcase>

5.4 assert-sql-query-le

This tag asserts the SQL query value is less than or equal to an expected value.

Table 14-69 assert-sql-query-le

Attribute Required Description

value

Yes

Expected value

type

Yes

Must provide type of value as one of these strings 'string', 'slong32', or 'double'

commit

No

True if the SQL query should be committed (defaults to false)

nullable

No

True if the SQL query results could be null (defaults to false)

bind-name

No

Provides a name for store procedure query like 'begin rp_xx_pkg.get_name(:name); end;'. For this call the parameter must be set to ':name'.

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<testcase 
   name="assert-sql-query-le lt case">
   <set-environment-variable name="QUERY" value="select count(*) from rp_g_scls_d where scls='10000001'"/>
   <assert-sql-query-le value="2" type="slong32">
    [QUERY]
   </assert-sql-query-le>
</testcase>

5.5 assert-sql-query-lt

This tag asserts the SQL query value is less than an expected value.

Table 14-70 assert-sql-query-lt

Attribute Required Description

value

Yes

Expected value

type

Yes

Must provide type of value as one of these strings 'string', 'slong32', or 'double'

commit

No

True if the SQL query should be committed (defaults to false)

nullable

No

True if the SQL query results could be null (defaults to false)

bind-name

No

Provides a name for store procedure query like 'begin rp_xx_pkg.get_name(:name); end;'. For this call the parameter must be set to ':name'.

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<testcase 
    name="assert-sql-query-lt">
    <set-environment-variable name="QUERY" value="select count(*) from rp_g_scls_d where scls='10000001'"/>
    <assert-sql-query-lt value="2" type="slong32">
     [QUERY]
    </assert-sql-query-lt>
</testcase>

5.6 assert-sql-query-ne

This tag asserts the SQL query value is not equal to an expected value.

Table 14-71 assert-sql-query-ne

Attribute Required Description

value

Yes

Expected value

type

Yes

Must provide type of value as one of these strings 'string', 'slong32', or 'double'

commit

No

True if the SQL query should be committed (defaults to false)

nullable

No

True if the SQL query results could be null (defaults to false)

bind-name

No

Provides a name for store procedure query like 'begin rp_xx_pkg.get_name(:name); end;'. For this call the parameter must be set to ':name'.

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<testcase 
   name="assert-sql-query-ne">
   <set-environment-variable name="QUERY" value="select count(*) from rp_g_scls_d where scls='10000001'"/>
   <assert-sql-query-ne value="2" type="slong32">
    [QUERY]
   </assert-sql-query-ne>
</testcase>

5.7 call-rule-group

This tag execute a rule group contain in the PDS database.

Table 14-72 call-rule-group

Attribute Required Description

rule-group

Yes

Name of rule group to execute

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


5.8 call-special-expression

This tag calls a special expression in the PDS database.

Table 14-73 call-special-expression

Attribute Required Description

expression

Yes

Special expression to call

lhs-measures

Yes

LHS comma separated list of measures

rhs-measures

Yes

RHS comma separated list of measures

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


5.9 dump-database-tables

This tag dump one or more SQL tables to CSV text file given a list of SQL tables. The CSV test files created will be contain in the RPAC data directory unless the attribute dst-directory is used to specify the directory to contain these files. One and only one of these attributes 'sql-tables' and 'sql-tables-file' must be provided.

Table 14-74 dump-database-tables

Attribute Required Description

sql-tables

No

List of SQL table names to dump to CSV text files.

sql-tables-file

No

File containing list of SQL table names to dump to CSV text files. This path is relative to the RPAC data directory.

dst-directory

No

Path of directory to contain the CSV text files. This path is relative to the RPAC data directory. If not provide the CSV text files will be written into the RPAC data directory. If the directory does not exists it will be created.

sorted

No

Use the table keys to sort the rows (Defaults to false).

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


5.10 execute-bdi-extractor

This tag executes the request BDI extractor. The return control identifier is contain in the variable 'EXTRACTOR_CONTROL_ID'.

Table 14-75 execute-bdi-extractor

Attribute Required Description

extractor

Yes

Extractor name

job-context

Yes

Job context

control-id

No

Control identifier (defaults to 0)

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


5.11 execute-bdi-importer

This tag executes the request BDI importer.

Table 14-76 execute-bdi-importer

Attribute Required Description

importer

Yes

Importer name

appl-name

Yes

Application name

module

Yes

Name of module

date-set-type

Yes

Data set type

job-context

Yes

Job context

data-set-id

No

Data set identifier (defaults to 0)

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


5.12 execute-sql-query

This tag executes the SQL query provied as the value of this tag.

Table 14-77 execute-sql-query

Attribute Required Description

commit

No

True if the SQL query will be committed

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<execute-sql-query>
   DELETE FROM RP_G_STR_D WHERE STR IN
   ('1194s', '1195s', '1197s', '1198s', '1200s', '8888s', '1193s', '1196s', '9999s', '1199s')
</execute-sql-query>

5.13 load-database-tables

This tag loads one or more tables from CSV text file given a list of text files or directories contain these files. Each file must have a '.csv' extension. The file path will be relative to the RPAC data directory. The table will be truncated before loading the data from the CSV text file.

Table 14-78 load-database-tables

Attribute Required Description

csv-files

Yes

List of CSV text files or directories containing these files. Each file must have a '.csv' extension. The file path will be relative to the RPAC data directory.

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


5.14 set-database-role

This tag sets the role used to access the database.

Table 14-79 set-database-role

Attribute Required Description

role

Yes

Role used to access the database

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<set-database-role role="data_mart"/>

5.15 sql-start-trace

This tag enables tracing of SQL queries to a text file.

Table 14-80 sql-start-trace

Attribute Required Description

trace-path

No

Text file path. (Defaults to 'trace.txt')

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


5.16 sql-stop-trace

This tag stops tracing SQL queries.

Table 14-81 sql-stop-trace

Attribute Required Description

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


5.17 truncate-database-tables

This tag truncates comma seperated list of database tables provided as the value of this tag.

Table 14-82 truncate-database-tables

Attribute Required Description

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


6. Workbook Measures Tags

This section describes the Workbook measures tags.

6.1 assert-workbook-measure-exists

This tag asserts a workbook measure exists.

Table 14-83 assert-workbook-measure-exists

Attribute Required Description

name

Yes

Workbook measure name

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<assert-workbook-measure-exists name="mpwpslsr"/>

6.2 assert-workbook-measure-intx

This tag asserts a workbook measure base intersection matches an expected value.

Table 14-84 assert-workbook-measure-intx

Attribute Required Description

name

Yes

Workbook measure name

intx

Yes

Intersection string to compare with

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<assert-workbook-measure-intx name="mpwpslsr" intx="chnlsclsweek"/>

6.3 assert-workbook-measure-value-eq

This tag asserts a workbook measure value is equal to an expected value.

Table 14-85 assert-workbook-measure-value-eq

Attribute Required Description

name

Yes

Workbook measure name

value

No

Expected value of workbook measure. (Defaults to NA). Date value must be provided in one of six formats '%Y%m%d%H%M%S', '%Y%m%d%H%M', '%Y%m%d', '%m/%d/%Y %H:%M:%S', '%m/%d/%Y %H:%M', or '%m/%d/%Y'. For boolean measure valid values are 't' or 'true' of any case while all other values are false.

precision

No

The number of decimal places to be considered for assertion

namedkeys

No

List of colon separated position specs. There must be one position specs for each dimension of the measure. A position specs is a comma separate list of sub-specs. A sub-spec can be a position name, a range of position names like 'w01_1997-w18_1997', or an asterisk. An asterisk '*' indicates all positions of the given dimension will be used. A position name can be replace with a position index.

intersection

No

Intersection to assert measure at (defaults to base intersection)

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

    <assert-workbook-measure-value-eq name="r_ex_demoa" namedkeys="w02_2009,w03_2009,w04_2009:dept03:str1000" value="10"/>

6.4 assert-workbook-measure-value-ge

This tag asserts a workbook measure value is greater than or equal to an expected value

Table 14-86 assert-workbook-measure-value-ge

Attribute Required Description

name

Yes

Workbook measure name

value

No

Expected value of workbook measure. (Defaults to NA). Date value must be provided in one of six formats '%Y%m%d%H%M%S', '%Y%m%d%H%M', '%Y%m%d', '%m/%d/%Y %H:%M:%S', '%m/%d/%Y %H:%M', or '%m/%d/%Y'. For boolean measure valid values are 't' or 'true' of any case while all other values are false.

precision

No

The number of decimal places to be considered for assertion

namedkeys

No

List of colon separated position specs. There must be one position specs for each dimension of the measure. A position specs is a comma separate list of sub-specs. A sub-spec can be a position name, a range of position names like 'w01_1997-w18_1997', or an asterisk. An asterisk '*' indicates all positions of the given dimension will be used. A position name can be replace with a position index.

intersection

No

Intersection to assert measure at (defaults to base intersection)

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<assert-workbook-measure-value-ge name="r_ex_demoa" namedkeys="w02_2009,w03_2009,w04_2009:dept03:str1000" value="10"/>

6.5 assert-workbook-measure-value-gt

This tag asserts a workbook measure value is greater than an expected value

Table 14-87 assert-workbook-measure-value-gt

Attribute Required Description

name

Yes

Workbook measure name

value

No

Expected value of workbook measure. (Defaults to NA). Date value must be provided in one of six formats '%Y%m%d%H%M%S', '%Y%m%d%H%M', '%Y%m%d', '%m/%d/%Y %H:%M:%S', '%m/%d/%Y %H:%M', or '%m/%d/%Y'. For boolean measure valid values are 't' or 'true' of any case while all other values are false.

precision

No

The number of decimal places to be considered for assertion

namedkeys

No

List of colon separated position specs. There must be one position specs for each dimension of the measure. A position specs is a comma separate list of sub-specs. A sub-spec can be a position name, a range of position names like 'w01_1997-w18_1997', or an asterisk. An asterisk '*' indicates all positions of the given dimension will be used. A position name can be replace with a position index.

intersection

No

Intersection to assert measure at (defaults to base intersection)

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<assert-workbook-measure-value-gt name="r_ex_demoa" namedkeys="w02_2009,w03_2009,w04_2009:dept03:str1000" value="10"/>

6.6 assert-workbook-measure-value-le

This tag asserts a workbook measure value is less than or equal to an expected value

Table 14-88 assert-workbook-measure-value-le

Attribute Required Description

name

Yes

Workbook measure name

value

No

Expected value of workbook measure. (Defaults to NA). Date value must be provided in one of six formats '%Y%m%d%H%M%S', '%Y%m%d%H%M', '%Y%m%d', '%m/%d/%Y %H:%M:%S', '%m/%d/%Y %H:%M', or '%m/%d/%Y'. For boolean measure valid values are 't' or 'true' of any case while all other values are false.

precision

No

The number of decimal places to be considered for assertion

namedkeys

No

List of colon separated position specs. There must be one position specs for each dimension of the measure. A position specs is a comma separate list of sub-specs. A sub-spec can be a position name, a range of position names like 'w01_1997-w18_1997', or an asterisk. An asterisk '*' indicates all positions of the given dimension will be used. A position name can be replace with a position index.

intersection

No

Intersection to assert measure at (defaults to base intersection)

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<assert-workbook-measure-value-le name="r_ex_demoa" namedkeys="w02_2009,w03_2009,w04_2009:dept03:str1000" value="10"/>

6.7 assert-workbook-measure-value-lt

This tag asserts a workbook measure value is less than an expected value

Table 14-89 assert-workbook-measure-value-lt

Attribute Required Description

name

Yes

Workbook measure name

value

No

Expected value of workbook measure. (Defaults to NA). Date value must be provided in one of six formats '%Y%m%d%H%M%S', '%Y%m%d%H%M', '%Y%m%d', '%m/%d/%Y %H:%M:%S', '%m/%d/%Y %H:%M', or '%m/%d/%Y'. For boolean measure valid values are 't' or 'true' of any case while all other values are false.

precision

No

The number of decimal places to be considered for assertion

namedkeys

No

List of colon separated position specs. There must be one position specs for each dimension of the measure. A position specs is a comma separate list of sub-specs. A sub-spec can be a position name, a range of position names like 'w01_1997-w18_1997', or an asterisk. An asterisk '*' indicates all positions of the given dimension will be used. A position name can be replace with a position index.

intersection

No

Intersection to assert measure at (defaults to base intersection)

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<assert-workbook-measure-value-lt name="r_ex_demoa" namedkeys="w02_2009,w03_2009,w04_2009:dept03:str1000" value="10"/>

6.8 assert-workbook-measure-value-ne

This tag asserts a workbook measure value is not equal to an expected value.

Table 14-90 assert-workbook-measure-value-ne

Attribute Required Description

name

Yes

Workbook measure name

value

No

Expected value of workbook measure. (Defaults to NA). Date value must be provided in one of six formats '%Y%m%d%H%M%S', '%Y%m%d%H%M', '%Y%m%d', '%m/%d/%Y %H:%M:%S', '%m/%d/%Y %H:%M', or '%m/%d/%Y'. For boolean measure valid values are 't' or 'true' of any case while all other values are false.

precision

No

The number of decimal places to be considered for assertion

namedkeys

No

List of colon separated position specs. There must be one position specs for each dimension of the measure. A position specs is a comma separate list of sub-specs. A sub-spec can be a position name, a range of position names like 'w01_1997-w18_1997', or an asterisk. An asterisk '*' indicates all positions of the given dimension will be used. A position name can be replace with a position index.

intersection

No

Intersection to assert measure at (defaults to base intersection)

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

Example<testcase>
    <assert-workbook-measure-value-ne name="r_ex_demoa" namedkeys="w02_2009,w03_2009,w04_2009:dept03:str1000" value="10"/>
</testcase>

6.9 assert-workbook-measures-match

This tag asserts workbook measures have matching content. The content of this tag can limit the comparison to a sub-set of the measure data. The format is DimName0:dim0pos0,dim0pos1,dim0pos3|DimName1:dim1pos0. Which is N number of dimension/positions lines with a vertical bar separator. Each dimension/positions lines has a dimension name followed by a colon separator and N position names with a comma separator between each name. This is an optional value.

Table 14-91 assert-workbook-measures-match

Attribute Required Description

lhs-measure

Yes

LHS measure used for comparison

rhs-measure

Yes

RHS measure used for comparison

output-file

No

Output file name containing list of differences (Defaults to unique name base on tag line number and xml file name containing tag).

max-diffs

No

Maximum number of differences allow before stopping match (defaults to 32)

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<testcase>
   <assert-workbook-measures-match lhs-measure="rm1" rhs-measure="rm2">
      week:w45_2009,w46_2009,w47_2009|sku:sku_22200001,sku_22200002
   </assert-workbook-measures-match>
   <assert-workbook-measures-match lhs-measure="rm1" rhs-measure="rm2"/>
</testcase>

6.10 assert-workbook-popcount-value-eq

This tag asserts a workbook pop count is equal to an expected value.

Table 14-92 assert-workbook-popcount-value-eq

Attribute Required Description

name

Yes

Workbook measure name

pop-count

No

Expected popcount (Defaults to zero)

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<assert-workbook-popcount-value-eq name="mpwpslsr" pop-count="1"/>

6.11 assert-workbook-popcount-value-ge

This tag asserts a workbook pop count is greater than or equal to an expected value.

Table 14-93 assert-workbook-popcount-value-ge

Attribute Required Description

name

Yes

Workbook measure name

pop-count

No

Expected popcount (Defaults to zero)

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<assert-workbook-popcount-value-ge name="mpwpslsr" pop-count="1"/>

6.12 assert-workbook-popcount-value-gt

This tag asserts a workbook pop count is greater than an expected value.

Table 14-94 assert-workbook-popcount-value-gt

Attribute Required Description

name

Yes

Workbook measure name

pop-count

No

Expected popcount (Defaults to zero)

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<assert-workbook-popcount-value-gt name="mpwpslsr" pop-count="0"/>

6.13 assert-workbook-popcount-value-le

This tag asserts a workbook pop count is less than or equal to an expected value.

Table 14-95 assert-workbook-popcount-value-le

Attribute Required Description

name

Yes

Workbook measure name

pop-count

No

Expected popcount (Defaults to zero)

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<assert-workbook-popcount-value-le name="mpwpslsr" pop-count="1"/>

6.14 assert-workbook-popcount-value-lt

This tag asserts a workbook pop count is less than an expected value.

Table 14-96 assert-workbook-popcount-value-lt

Attribute Required Description

name

Yes

Workbook measure name

pop-count

No

Expected popcount (Defaults to zero)

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<assert-workbook-popcount-value-lt name="mpwpslsr" pop-count="1000"/>

6.15 assert-workbook-popcount-value-ne

This tag asserts a workbook pop count is not equal to an expected value.

Table 14-97 assert-workbook-popcount-value-ne

Attribute Required Description

name

Yes

Workbook measure name

pop-count

No

Expected popcount (Defaults to zero)

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<assert-workbook-popcount-value-ne name="mpwpslsr" pop-count="10"/>

6.16 set-workbook-measure

This tag sets the value of a workbook measure based on provided attributes.

Table 14-98 set-workbook-measure

Attribute Required Description

name

Yes

Workbook measure name

value

No

Value to set workbook cell to. (Defaults to NA). Date value must be provided in one of six formats '%Y%m%d%H%M%S', '%Y%m%d%H%M', '%Y%m%d', '%m/%d/%Y %H:%M:%S', '%m/%d/%Y %H:%M', or '%m/%d/%Y'. For boolean measure valid values are 't' or 'true' of any case while all other values are false.

keyint

No

Intersection of namedKey attribute if not provided intersection of namedKey is base intersection of the measure.

namedkeys

No

List of colon separated position specs. There must be one position specs for each dimension of the measure. A position specs is a comma separate list of sub-specs. A sub-spec can be a position name, a range of position names like 'w01_1997-w18_1997', or an asterisk. An asterisk '*' indicates all positions of the given dimension will be used. A position name can be replace with a position index.

incremental

No

True if evaluation is to be incremental (Defaults to false)

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<testcase>
   <set-workbook-measure name="r_ex_demoa" namedkeys="w02_2009,w03_2009,w04_2009:dept03:str1000" value="10"/>
   <set-workbook-measure name="r_ex_demob" namedkeys="w02_2009-w04_2009:dept03:str1000" value="10"/>
   <set-workbook-measure name="r_ex_democ" namedkeys="w02_2009-w04_2009:*:str1000" value="10"/>
   <set-workbook-measure name="r_ex_democ" namedkeys="w02_2009-w04_2009:*:str1001"/>
   <set-workbook-measure name="r_ex_demod" namedkeys="w02_2009-w04_2009:*:str1000" value="10" incremental="true"/>
</testcase>

6.17 edit-workbook-measure

This tag edits the value of a workbook measure based on provided attributes.

Table 14-99 edit-workbook-measure

Attribute Required Description

name

Yes

Workbook measure name

value

No

Value to set workbook cell to. (Defaults to NA). Date value must be provided in one of six formats '%Y%m%d%H%M%S', '%Y%m%d%H%M', '%Y%m%d', '%m/%d/%Y %H:%M:%S', '%m/%d/%Y %H:%M', or '%m/%d/%Y'. For boolean measure valid values are 't' or 'true' of any case while all other values are false.

keyint

No

Intersection of namedKey attribute if not provided intersection of namedKey is base intersection of the measure.

namedkeys

No

List of colon separated position specs. There must be one position specs for each dimension of the measure. A position specs is a comma separate list of sub-specs. A sub-spec can be a position name, a range of position names like 'w01_1997-w18_1997', or an asterisk. An asterisk '*' indicates all positions of the given dimension will be used. A position name can be replace with a position index.

incremental

No

True if evaluation is to be incremental (Defaults to false)

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<testcase>
   <edit-workbook-measure name="[MEAS]" namedkeys="[KEY0]" value="Measure Analysis Test"/>
   <edit-workbook-measure name="r_ex_demoa" namedkeys="w02_2009,w03_2009,w04_2009:dept03:str1000" value="10"/>
   <edit-workbook-measure name="r_ex_demob" namedkeys="w02_2009-w04_2009:dept03:str1000" value="10"/>
   <edit-workbook-measure name="r_ex_democ" namedkeys="w02_2009-w04_2009:*:str1000" value="10"/>
   <edit-workbook-measure name="r_ex_democ" namedkeys="w02_2009-w04_2009:*:str1001"/>
</testcase>

6.18 clear-workbook-measure-list

This tag clears a list of workbook measures of all data. Must provide either the attribute 'filename' where the list of measures is contain in a file. Or the attribute 'measures' where the value of the attribute is a comma separated list measures names.

Table 14-100 clear-workbook-measure-list

Attribute Required Description

filename

No

Filename of file containing workbook measures names

measures

No

Comma separated list of workbook measure names

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<clear-workbook-measure-list measures="mpwpslsr,mtwpappstt"/>

6.19 clear-workbook-measure

This tag clears a workbook measure of all data.

Table 14-101 clear-workbook-measure

Attribute Required Description

name

Yes

Workbook measure name

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

 <clear-workbook-measure name="mpwpslsr"/>

6.20 assert-measure-is-not-protected

This tag asserts a measures is not protected based on previous edited.

Table 14-102 assert-measure-is-not-protected

Attribute Required Description

name

Yes

Name of workbook measure to assert is not protected

variable

No

Name of RPAC or environment variable to true/false based on the status of the measure not being protected. If not provided, tag will report an error if the measure is protected.

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<testsuite name="Assert measure is not protected">

<testcase name="fails if measure is not protected">
   <assert-measure-is-not-protected name="[MEAS]"/>
</testcase>

<testcase name="set variable MSG1 to false/true base on measure not being protected">
   <assert-measure-is-not-protected name="[MEAS]" variable="MSG1"/>
</testcase>

</testsuite>

6.21 assert-measure-is-protected

This tag asserts a measures is protected based on previous edited.

Table 14-103 assert-measure-is-not-protected

Attribute Required Description

name

Yes

Name of workbook measure to assert is not protected

variable

No

Name of RPAC or environment variable to true/false based on the status of the measure being protected. If not provided, tag will report an error if the measure is not protected.

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<testsuite name="Assert measure is protected">

<testcase name="fails if measure is not protected">
   <assert-measure-is-protected name="[MEAS]"/>
</testcase>

<testcase name="set variable MSG1 to false/true base on measure being protected">
   <assert-measure-is-protected name="[MEAS]" variable="MSG1"/>
</testcase>

</testsuite>

7. Workbook Operations Tags

This section describes the Workbook Operations tags.

7.1 assert-window-contain-measure

This tag asserts current workbook named window either contains or does not contain a list of measures.

Table 14-104 assert-window-contain-measure

Attribute Required Description

name

Yes

Window name of current workbook

measures

No

Comma separated list of measures names

containflag

No

If true measures are expected to be contained in the current workbook windows.

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<testcase>
   <set-environment-variable name="WINNAME" value="chnlscls_W"/>
   <set-environment-variable name="MEAS1" value="mpwpgmmx"/>
   <assert-window-contain-measure name="[WINNAME]" containflag="true" measures="[MEAS1]"/>
</testcase>

7.2 assert-window-exists

This tag asserts if a window exists in the current workbook

Table 14-105 assert-window-exists

Attribute Required Description

name

Yes

Window name

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<assert-window-exists name="MP_TB02_WS01"/>

7.3 assert-window-intersection

This tag asserts window intersection matches provided intersection.

Table 14-106 assert-window-intersection

Attribute Required Description

name

Yes

Window name

baseint

No

Intersection string to compare with

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<assert-window-intersection name="MP_TB02_WS01" baseint="sclschnl"/>

7.4 assert-window-not-exists

This tag asserts if a window does not exist in the current workbook.

Table 14-107 assert-window-not-exists

Attribute Required Description

name

Yes

Window name

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

 <assert-window-not-exists name="MP_TB02_TEST"/>

7.5 build

This tag builds workbook based on provided tag data.

Note that this tag can only be used within the workbook-operations tag. This tag supports these subtag wizard-page-settings.

Table 14-108 build

Attribute Required Description

template-name

Yes

Template name

user

Yes

User used to access workbook

label

No

Label for workbook (defaults to blank)

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<workbook-operations>
   <build template-name="measureanalysis" label="MEAS AN" user="oci.admin">
      <wizard-page-settings id="ExtraMeasuresPage">
          <set-selections control-name="lb1">mpwpgmmx</set-selections>
      </wizard-page-settings>
      <wizard-page-settings id="scls">
          <set-tree-selections dim-name="scls" rollup-name="scls">10000001</set-tree-selections>
      </wizard-page-settings>
      <wizard-page-settings id="chnl">
          <set-tree-selections dim-name="chnl" rollup-name="chnl">1</set-tree-selections>
      </wizard-page-settings>
   </build>
</workbook-operations>

7.6 calc

This tag does workbook calc.

Note that this tag can only be used within the workbook-operations tag.

Table 14-109 calc

Attribute Required Description

template-name

Yes

Template name

user

Yes

User used to access workbook

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<workbook-operations>
   <calc template-name="measureanalysis" user="oci.admin"/>
</workbook-operations>

7.7 close

This tag does workbook close.

Note that this tag can only be used within the workbook-operations tag.

Table 14-110 close

Attribute Required Description

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<testcase>
   <workbook-operations>
      <close/>
   </workbook-operations>
</testcase>

7.8 commit

This tag does workbook commit.

Note that this tag can only be used within the workbook-operations tag.

Table 14-111 commit

Attribute Required Description

template-name

Yes

Template name

user

Yes

User used to access workbook

name

No

Name to use to refer to this commit ASAP (defaults to bank)

wait-for

No

Number of seconds to wait for the commit to complete. (defaults to 8 hours)

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<workbook-operations>
     <commit template-name="measureanalysis" user="oci.admin"/>
</workbook-operations>

7.9 custom-menu

This tag handles a custom menu.

Note that this tag can only be used within the workbook-operations tag.

Table 14-112 custom-menu

Attribute Required Description

template-name

Yes

Template name

user

Yes

User used to access workbook

menu-label

Yes

Menu label for this custom menu

menu-exist

No

Flag to set to 'true' or 'false' to enable throwing an exception if the menu item is or is not found

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<workbook-operations>
    <calc template-name="MP_WB" user="oci.admin"/>
    <custom-menu template-name="MP_WB" user="oci.admin" menu-label="menuItem10101"/>
</workbook-operations>

7.10 set-hier-selection

This tag sets the selected of wizard page.

Note that this tag can only be used within the wizard-page-settings tag.

Table 14-113 set-hier-selection

Attribute Required Description

control-name

Yes

Name of the control for a wizard page

selection

Yes

Text for the selection operation

dim-name

Yes

Dimension name for the tree selection

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


7.11 set-selected

This tag sets the selected of wizard page.

Note that this tag can only be used within the wizard-page-settings tag.

Table 14-114 set-selected

Attribute Required Description

control-name

Yes

Name of the control for a wizard page

selected

Yes

Text for the selected operation

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


7.12 set-selection

This tag set the selection of wizard page.

Note that this tag can only be used within the wizard-page-settings tag.

Table 14-115 set-selection

Attribute Required Description

control-name

Yes

Name of the control for a wizard page

selection

Yes

Text for the selection operation

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


7.13 set-selections

This tag set the selections of wizard page.

Note that this tag can only be used within the wizard-page-settings tag.

Table 14-116 set-selections

Attribute Required Description

control-name

Yes

Name of the control for a wizard page

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<workbook-operations>
   <build template-name="measureanalysis" label="MEAS AN" user="oci.admin">
      <wizard-page-settings id="ExtraMeasuresPage">
         <set-selections control-name="lb1">mpwpgmmx</set-selections>
      </wizard-page-settings>
      <wizard-page-settings id="scls">
         <set-tree-selections dim-name="scls" rollup-name="scls">10000001</set-tree-selections>
      </wizard-page-settings>
      <wizard-page-settings id="chnl">
         <set-tree-selections dim-name="chnl" rollup-name="chnl">1</set-tree-selections>
      </wizard-page-settings>
   </build>
</workbook-operations>

7.14 set-text

This tag set the text of wizard page.

Note that this tag can only be used within the wizard-page-settings tag.

Table 14-117 set-text

Attribute Required Description

control-name

Yes

Name of the control for a wizard page

text

Yes

Text for the operation

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


7.15 set-tree-selections

This tag set the tree selections of wizard page.

Note that this tag can only be used within the wizard-page-settings tag.

Table 14-118 set-tree-selections

Attribute Required Description

rollup-name

Yes

Roll up name for the tree selection

dim-name

Yes

Dimension name for the tree selection

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<workbook-operations>
   <build template-name="measureanalysis" label="MEAS AN" user="oci.admin">
      <wizard-page-settings id="ExtraMeasuresPage">
         <set-selections control-name="lb1">mpwpgmmx</set-selections>
      </wizard-page-settings>
      <wizard-page-settings id="scls">
         <set-tree-selections dim-name="scls" rollup-name="scls">10000001</set-tree-selections>
      </wizard-page-settings>
      <wizard-page-settings id="chnl">
         <set-tree-selections dim-name="chnl" rollup-name="chnl">1</set-tree-selections>
      </wizard-page-settings>
   </build>
</workbook-operations>

7.16 wizard-page-settings

This tag contains the settings for a wizard page.

Note that this tag can only be used within the build tag. This tag support the following subtags: set-hier-selection, set-selected, set-selection, set-selections, set-text, set-tree-selections.

Table 14-119 wizard-page-settings

Attribute Required Description

id

Yes

ID used to match up settings with wizard pages

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<workbook-operations>
    <build template-name="measureanalysis" label="MEAS AN" user="oci.admin">
       <wizard-page-settings id="ExtraMeasuresPage">
          <set-selections control-name="lb1">mpwpgmmx</set-selections>
       </wizard-page-settings>
       <wizard-page-settings id="scls">
          <set-tree-selections dim-name="scls" rollup-name="scls">10000001</set-tree-selections>
       </wizard-page-settings>
       <wizard-page-settings id="chnl">
          <set-tree-selections dim-name="chnl" rollup-name="chnl">1</set-tree-selections>
       </wizard-page-settings>    </build>
</workbook-operations>

7.17 workbook-operations

This tag contains the workbook operation to be executed.

Note that this tag support the following subtags: build, calc, close, commit, custom-menu, open, rebuild, refresh, update-dpm.

Table 14-120 workbook-operations

Attribute Required Description

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


7.18 open

This tag opens given workbook.

Note that this tag can only be used within the workbook-operations tag.

Table 14-121 open

Attribute Required Description

workbook-name

Yes

Name of workbook

user

Yes

User that created the workbook

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<testcase>
   <workbook-operations>
      <open workbook-name="[NEW_WORKBOOK]" user="[USER]"/>
   </workbook-operations>
</testcase>

7.19 rebuild

This tag rebuilds workbook base on segment Id of previous build of the workbook.

Note that this tag can only be used within the workbook-operations tag.

Table 14-122 rebuild

Attribute Required Description

segment-id

Yes

Segment ID of workbook to rebuild

user

Yes

User used to access the workbook

label

No

Label for workbook (defaults to blank)

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<testcase>
   <workbook-operations>
      <rebuild segment-id="[NEW_SEGMENT]" user="[USER]" label="Translation Workbook"/>
   </workbook-operations>
</testcase>

7.20 refresh

This tag does workbook refresh.

Note that this tag can only be used within the workbook-operations tag.

Table 14-123 refresh

Attribute Required Description

user

Yes

User used to access the workbook

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<testcase>
   <workbook-operations>
      <refresh user="[USER]"/>
   </workbook-operations>
</testcase>

7.21 delete-informal-position

This tag deletes the DPM data.

Table 14-124 delete-informal-position

Attribute Required Description

user

Yes

User used to access the workbook

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

 <delete-informal-position levelname="str" position="strdpm_ut2"/>

7.22 update-dpm

This tag updates the DPM data.

Note that this tag can only be used within the workbook-operations tag.

Table 14-125 update-dpm

Attribute Required Description

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


7.23 update-informal-positions

This tag updates the informal positions.

Note that this tag support this subtag: dpmposinfo.

Table 14-126 update-informal-positions

Attribute Required Description

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<update-informal-positions>
   <dpmposinfo lang="english">
      <dpmposentry levelname="dstr" position="dstr34" isnewpos="false" label="34 SPAIN" oldposition="dstr34" type="0" count="1"/>
      <dpmposentry levelname="str" position="strdpm_ut2" isnewpos="true" label="Store DPM UT 1" oldposition="" type="0" count="1"/>
   </dpmposinfo>
</update-informal-positions>

7.24 dpmposentry

DPM position Entry.

Note that this tag can only be used within the dpmposinfo tag.

Table 14-127 dpmposentry

Attribute Required Description

levelname

Yes

Level Name

isnewpos

Yes

True for new position and false for modify

position

Yes

position name

label

No

position label

oldposition

No

old position name

type

No

type

count

No

count

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<update-informal-positions>
   <dpmposinfo lang="english">
      <dpmposentry levelname="dstr" position="dstr34" isnewpos="false" label="34 SPAIN" oldposition="dstr34" type="0" count="1"/>
      <dpmposentry levelname="str" position="strdpm_ut2" isnewpos="true" label="Store DPM UT 1" oldposition="" type="0" count="1"/>
   </dpmposinfo>
</update-informal-positions>

7.25 dpmposinfo

DPM position info.

Note that this tag can only be used within the update-informal-positions tag. This tag support this subtag: dpmposentry.

Table 14-128 dpmposinfo

Attribute Required Description

lang

Yes

Language attribute

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<update-informal-positions>
   <dpmposinfo lang="english">
      <dpmposentry levelname="dstr" position="dstr34" isnewpos="false" label="34 SPAIN" oldposition="dstr34" type="0" count="1"/>
      <dpmposentry levelname="str" position="strdpm_ut2" isnewpos="true" label="Store DPM UT 1" oldposition="" type="0" count="1"/>
   </dpmposinfo>
</update-informal-positions>

8. Workbook Execute Expression Tag

This section describes the Workbook Execute Expression tag.

8.1 workbook-execute-expression

This tag executes an expression in a workbook.

Table 14-129 workbook-execute-expression

Attribute Required Description

expression

Yes

The expression to execute/calculate

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


8.2 rule-debug-log

This tag logs a message to detail rule debug logging. Each occurrence of the message will be replaced with a new line.

Table 14-130 rule-debug-log

Attribute Required Description

msg

Yes

Message to be logged. Each occurrence of the message will be replaced with a new line.

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<testsuite name="Rule detail debug example">

<testcase name="Default path">
   <rule-debug-start/>
   <rule-debug-log msg="This is a test
This is line2
This is line3"/>
   <rule-debug-stop/>
</testcase>

<testcase name="Given path">
   <rule-debug-start log-path="Larry"/>
   <rule-debug-log msg="This is the second test
This is line2
This is line3"/>
   <rule-debug-stop/>
</testcase>

</testsuite>

8.3 rule-debug-start

This tag starts the detail rule debug log.

Table 14-131 rule-debug-start

Attribute Required Description

log-path

No

The path which to send the detail rule logging. (This defaults to Rule_0000b00.log, where the first four zeros are replaced with the current line number and two zeros after the b are used to make the file name unique.)

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<testsuite name="Rule detail debug example">

<testcase name="Default path">
   <rule-debug-start/>
   <rule-debug-log msg="This is a test
This is line2
This is line3"/>
   <rule-debug-stop/>
</testcase>

<testcase name="Given path">
   <rule-debug-start log-path="Larry"/>
   <rule-debug-log msg="This is the second test
This is line2
This is line3"/>
   <rule-debug-stop/>
</testcase>

</testsuite>

8.4 rule-debug-stop

This tag closes the detail rule debug logging.

Table 14-132 rule-debug-start

Attribute Required Description

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<testsuite name="Rule detail debug example">

<testcase name="Default path">
   <rule-debug-start/>
   <rule-debug-log msg="This is a test
This is line2
This is line3"/>
   <rule-debug-stop/>
</testcase>

<testcase name="Given path">
   <rule-debug-start log-path="Larry"/>
   <rule-debug-log msg="This is the second test
This is line2
This is line3"/>
   <rule-debug-stop/>
</testcase>

</testsuite>

9. Processes, Tasks, Environment Variables, and DateTime Tags

This section describes the processes, tasks, environment variables, and DateTime tags.

9.1 task-log

Given a task id, a variable will be updated to the full path of the task log.

Table 14-133 task-log

Attribute Required Description

task-id

Yes

Task ID of the log wanted

name

Yes

Name of the variable to contain log file path

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<testcase>
   <task-log task-id="[TASK_ID]" name="TASK_LOG"/>
   <assert-file-contains path="[TASK_LOG]" range="1:1" erase="true" text="[DATA]"/>
</testcase>

9.2 task-start

This tag starts a task process with the command line provided as the value of this tag.

Table 14-134 task-log

Attribute Required Description

is-script

No

Boolean to indicate that the process is a Task script (Defaults to false)

no-wait

No

Boolean to determine if RPAC will wait for process to exit (Defaults to false)

check-status

No

Boolean to determine if a non-zero return status will throw an exception (defaults to true)

assert-status-equal

No

Assert return status equals provide value (value defaults to zero)

assert-status-not-equal

No

Assert return status does not equals provide value (value defaults to zero)

task-name

No

Name to use for task (defaults to blank string)

task-label

No

Label to use for task (defaults to blank string)

task-domain-access

No

Limit access (None, Restricted, Offline) Restricted allow other processes limited access, Offline only allows admin processes to monitor tasks (defaults to None)

message

No

Message to use for either Full or Offline access (defaults to blank string)

wait-for

No

Number of seconds to wait for the task to complete (defaults to 8 hours)

timeout

No

Number of seconds to wait to access when using access modes Restricted or Offline(defaults to 2 hours)

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<testcase>
   <task-start
    task-name ="Start domaininfo task"
    task-label="Start domaininfo task"
    wait-for  ="120">
      domaininfo -d [PDS_PATH] -domainversion
   </task-start>
</testcase>

9.3 task-wait

This tag waits for RPAC created task to exit.

Table 14-135 task-wait

Attribute Required Description

task-id

Yes

Task id to wait for

check-status

No

Boolean to determine if a non-zero return status will throw an exception (defaults to true)

assert-status-equal

No

Assert return status equals provide value (value defaults to zero)

assert-status-not-equal

No

Assert return status does not equals provide value (value defaults to zero)

wait-for

No

Number of seconds to wait for (defaults to 8 hours)

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<testcase>
 <task-wait task-id="[TASK_ID]"/> 
</testcase>

9.4 sleep

This tag sleeps for 1 second or value provide with attributes.

Table 14-136 sleep

Attribute Required Description

seconds

No

Number of seconds for sleep

milliseconds

No

Number of milliseconds for sleep

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<sleep seconds="1"/>

9.5 shell

This tag starts a shell process with the command provided as the value of this tag.

Table 14-137 shell

Attribute Required Description

working-directory

No

Directory to use for shell, if not provided then the current working directory is used

is-shell

No

Boolean to indicate that the process is a shell script

check-status

No

Boolean to determine if a non-zero return status will throw an exception (defaults to true)

append-to-log

No

Boolean to determine if process should append to output log

remove-output

No

Boolean to determine if output is erase if there are no errors (defaults to true)

assert-status-equal

No

Assert return status equals provide value

assert-status-not-equal

No

Assert return status does not equals provide value

output

No

File name to which shell command will redirect its output

no-wait

No

Boolean to determine if RPAC will wait for process to exit

wait-for

No

Number of seconds to wait for

name

No

Name to use for process

unique-file

No

Name of the environmental variable to contain unique file path. Output of process will be log to this file path.

timer-file

No

File name to which process execution time will be appended to.

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<shell check-status="true" is-shell="false">mkdir "[PDS_PATH]/emptyDir"</shell>

9.6 set-date-format

This tag sets the date/time format of that [RPAC_DATE] variable with use.

Table 14-138 set-date-format

Attribute Required Description

calue

Yes

Date/time format to use for [RPAC_DATE] variable

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


9.7 set-environment-variable

This tag sets the value of an environmental variable.

Table 14-139 set-environment-variable

Attribute Required Description

name

Yes

Name of the environmental variable

calue

Yes

Value of the environmental variable

export

No

Boolean to determine if variable will be exported (defaults to false)

normalize

No

Boolean to indicate variable is file path that should be normalize (defaults to false)

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<testcase> 
   <set-environment-variable name="INPUT" value="[PDS_PATH]/input"/>
   <set-environment-variable name="PROCESSED" value="[INPUT]/processed"/>
   <set-environment-variable name="MY_WORKBOOK" value="[WORKBOOK_NAME]" export="true"/> 
</testcase>

9.8 rpas-today

This tag sets the RpasToday environmental variable to value of this tag.

Table 14-140 rpas-today

Attribute Required Description

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<rpas-today>20070101</rpas-today>

Where: the date is given in yyyymmdd format.

9.9 process-stop

This tag stops RPAC created process.

Table 14-141 process-stop

Attribute Required Description

name

Yes

Name used for the process

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


9.10 process-wait

This tag waits for RPAC created process to exit.

Table 14-142 process-wait

Attribute Required Description

name

Yes

Name used for the process

wait-for

No

Number of seconds to wait for

assert-status-equal

No

Assert return status equals provide value

assert-status-not-equal

No

Assert return status does not equals provide value

remove-output

No

Boolean to determine is output is erase if there is no error (defaults to true)

throw-error

No

Boolean to determine if wait will throw an exception if process does not exit (defaults to true)

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


9.11 get-unique-file-path

This tag sets the value of an environmental variable to a unique file path.

Table 14-143 get-unique-file-path

Attribute Required Description

name

Yes

Name of the environmental variable to contain unique file path

export

No

Boolean to determine if variable will be exported (defaults to false)

extension

No

File extension to used (defaults to .log) (defaults to false)

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<testcase>
   <set-environment-variable name="MEAS" value="rpacMeasure %s NA NA"/>
   <get-unique-file-path name="FILEPATH"/>
   <shell>exportMeasure -rdm [PDS_PATH] -meas "[MEAS]" -out [FILEPATH]</shell>
   <compare-file-content path="[FILEPATH]">
      "w02_2007Test1"|
      "w03_2007Test2"|
      "w04_2007Test3"
   </compare-file-content>
</testcase> 

9.12 assert-numeric-value-eq

This tag asserts an RPAC or environment variable is equal to an expected value.

Table 14-144 assert-numeric-value-eq

Attribute Required Description

name

Yes

Name of RPAC or the environmental variable.

value

No

Expected value (defaults to 0)

type

No

Must provide type of value as one of these strings slong32, or double (defaults to double).

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<once>
   <set-environment-variable name="VALUE1" value="32"/>
   <set-environment-variable name="VALUE2" value="3.145"/>
</once>

<testcase name="Check equal 32">
   <assert-numeric-value-eq name="VALUE1" value="32" type="slong32"/>
</testcase>

<testcase name="Check equal 3.145">
   <assert-numeric-value-eq name="VALUE2" value="3.145" type="double"/>
</testcase>

<testcase name="Check equal 3.145">
   <assert-numeric-value-eq name="VALUE2" value="3.145"/>
</testcase>

9.13 assert-numeric-value-ge

This tag asserts an RPAC or environment variable is greater than or equal to an expected value.

Table 14-145 assert-numeric-value-ge

Attribute Required Description

name

Yes

Name of RPAC or the environmental variable.

value

No

Expected value (defaults to 0)

type

No

Must provide type of value as one of these strings slong32, or double (defaults to double).

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<once>
   <set-environment-variable name="VALUE1" value="32"/>
   <set-environment-variable name="VALUE2" value="3.145"/>
</once>

<testcase name="Check great than or equal 32">
   <assert-numeric-value-ge name="VALUE1" value="32" type="slong32"/>
</testcase>

<testcase name="Check great than or equal 3.145">
   <assert-numeric-value-ge name="VALUE2" value="3.145" type="double"/>
</testcase>

<testcase name="Check great than or equal 3.145">
   <assert-numeric-value-ge name="VALUE2" value="3.145"/>
</testcase>

9.14 assert-numeric-value-gt

This tag asserts an RPAC or environment variable is greater than an expected value.

Table 14-146 assert-numeric-value-gt

Attribute Required Description

name

Yes

Name of RPAC or the environmental variable.

value

No

Expected value (defaults to 0)

type

No

Must provide type of value as one of these strings slong32, or double (defaults to double).

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<once>
   <set-environment-variable name="VALUE1" value="32"/>
   <set-environment-variable name="VALUE2" value="3.145"/>
</once>

<testcase name="Check great than 32">
   <assert-numeric-value-gt name="VALUE1" value="33" type="slong32"/>
</testcase>

<testcase name="Check great than 3.145">
   <assert-numeric-value-gt name="VALUE2" value="3.146" type="double"/>
</testcase>

<testcase name="Check great than 3.145">
   <assert-numeric-value-gt name="VALUE2" value="3.146"/>
</testcase>

9.15 assert-numeric-value-le

This tag asserts an RPAC or environment variable is less than or equal to an expected value.

Table 14-147 assert-numeric-value-le

Attribute Required Description

name

Yes

Name of RPAC or the environmental variable.

value

No

Expected value (defaults to 0)

type

No

Must provide type of value as one of these strings slong32, or double (defaults to double).

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<once>
   <set-environment-variable name="VALUE1" value="32"/>
   <set-environment-variable name="VALUE2" value="3.145"/>
</once>

<testcase name="Check less than or equal 32">
   <assert-numeric-value-le name="VALUE1" value="32" type="slong32"/>
</testcase>

<testcase name="Check less than or equal 3.145">
   <assert-numeric-value-le name="VALUE2" value="3.145" type="double"/>
</testcase>

<testcase name="Check less than or equal 3.145">
   <assert-numeric-value-le name="VALUE2" value="3.145"/>
</testcase>

9.16 assert-numeric-value-lt

This tag asserts an RPAC or environment variable is less than an expected value.

Table 14-148 assert-numeric-value-lt

Attribute Required Description

name

Yes

Name of RPAC or the environmental variable.

value

No

Expected value (defaults to 0)

type

No

Must provide type of value as one of these strings slong32, or double (defaults to double).

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<once>
   <set-environment-variable name="VALUE1" value="32"/>
   <set-environment-variable name="VALUE2" value="3.145"/>
</once>

<testcase name="Check less than 32">
   <assert-numeric-value-lt name="VALUE1" value="31" type="slong32"/>
</testcase>

<testcase name="Check less than 3.145">
   <assert-numeric-value-lt name="VALUE2" value="3.14" type="double"/>
</testcase>

<testcase name="Check less than 3.145">
   <assert-numeric-value-lt name="VALUE2" value="3.14"/>
</testcase>

9.17 assert-numeric-value-ne

This tag asserts an RPAC or environment variable is not equal to an expected value.

Table 14-149 assert-numeric-value-ne

Attribute Required Description

name

Yes

Name of RPAC or the environmental variable.

value

No

Expected value (defaults to 0)

type

No

Must provide type of value as one of these strings slong32, or double (defaults to double).

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<once>
   <set-environment-variable name="VALUE1" value="32"/>
   <set-environment-variable name="VALUE2" value="3.145"/>
</once>

<testcase name="Check not equal 32">
   <assert-numeric-value-ne name="VALUE1" value="33" type="slong32"/>
</testcase>

<testcase name="Check not equal 3.145">
   <assert-numeric-value-ne name="VALUE2" value="3.146" type="double"/>
</testcase>

<testcase name="Check not equal 3.145">
   <assert-numeric-value-ne name="VALUE2" value="3.146"/>
</testcase>

9.18 assert-string-value-contains

This tag asserts an RPAC or environment variable contains an expected value.

Table 14-150 assert-string-value-contains

Attribute Required Description

name

Yes

Name of RPAC or the environmental variable.

value

No

Expected value (defaults to 0)

case-sensitive

No

Case sensitive (defaults to false)

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<once>
   <set-environment-variable name="VALUE" value="Alpha"/>
</once>

<testcase name="Check equal Alpha">
   <assert-string-value-contains name="VALUE" value="Alpha"/>
</testcase>

<testcase name="Check equal ALPHA">
   <assert-string-value-contains name="VALUE" value="ALPHA" case-sensitive="true"/>
</testcase>

9.19 assert-string-value-does-not-contain

This tag asserts an RPAC or environment variable does not contain an expected value.

Table 14-151 assert-string-value-does-not-contain

Attribute Required Description

name

Yes

Name of RPAC or the environmental variable.

value

No

Expected value (defaults to 0).

case-sensitive

No

Case sensitive (defaults to false)

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<once>
   <set-environment-variable name="VALUE" value="Alpha"/>
</once>

<testcase name="Check equal Alpha">
   <assert-string-value-does-not-contain name="VALUE" value="Alpha"/>
</testcase>

<testcase name="Check equal ALPHA">
   <assert-string-value-does-not-contain name="VALUE" value="ALPHA" case-sensitive="true"/>
</testcase>

9.20 assert-string-value-equal

This tag asserts an RPAC or environment variable is equal to an expected value.

Table 14-152 assert-string-value-equal

Attribute Required Description

name

Yes

Name of RPAC or the environmental variable.

value

No

Expected value (defaults to 0).

case-sensitive

No

Case sensitive (defaults to false)

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<once>
   <set-environment-variable name="VALUE" value="Alpha"/>
</once>

<testcase name="Check equal Alpha">
   <assert-string-value-equal name="VALUE" value="Alpha"/>
</testcase>

<testcase name="Check equal ALPHA">
   <assert-string-value-equal name="VALUE" value="ALPHA" case-sensitive="true"/>
</testcase>

9.21 assert-string-value-not-equal

This tag asserts an RPAC or environment variable is not equal to an expected value.

Table 14-153 assert-string-value-not-equal

Attribute Required Description

name

Yes

Name of RPAC or the environmental variable.

value

No

Expected value (defaults to 0).

case-sensitive

No

Case sensitive (defaults to false)

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<once>
   <set-environment-variable name="VALUE" value="Alpha"/>
</once>

<testcase name="Check equal Alpha">
   <assert-string-value-not-equal name="VALUE" value="Alpha"/>
</testcase>

<testcase name="Check equal ALPHA">
   <assert-string-value-not-equal name="VALUE" value="ALPHA" case-sensitive="true"/>
</testcase>

9.22 if-numeric-value-eq-then-set

This tag asserts if an RPAC or environment variable is equal to an expected value then update RPAC variable to set value.

Table 14-154 if-numeric-value-eq-then-set

Attribute Required Description

name

Yes

Name of RPAC or the environmental variable to test.

variable

Yes

Name of RPAC or environment variable to set when comparison is true.

type

No

Must provide type of value as one of these strings slong32 or double (defaults to double).

value

No

Expected value (defaults to 0)

set-value

No

Value to assign to given variable if comparison is true (Defaults to true).

export

No

Boolean to determine if variable will be exported (defaults to false)

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<once>
   <set-environment-variable name="VALUE1" value="32"/>
   <set-environment-variable name="VALUE2" value="3.145"/>
</once>

<testcase name="Check equal 32">
   <if-numeric-value-eq-then-set name="VALUE1" variable="VALUE3" value="32" type="slong32"/>
</testcase>

<testcase name="Check equal 3.145">
   <if-numeric-value-eq-then-set name="VALUE2" variable="VALUE4" value="3.145" type="double"/>
</testcase>

<testcase name="Check equal 3.145">
   <if-numeric-value-eq-then-set name="VALUE2" variable="VALUE5" value="3.145"/>
</testcase>

<testcase name="Check equal 32">
   <if-numeric-value-eq-then-set name="VALUE1" variable="VALUE6" value="32" type="slong32" set-value="Value is 32"/>
</testcase>

9.23 if-numeric-value-ge-then-set

This tag asserts if an RPAC or environment variable is greater than or equal to an expected value then update RPAC variable to set value.

Table 14-155 if-numeric-value-ge-then-set

Attribute Required Description

name

Yes

Name of RPAC or the environmental variable to test.

variable

Yes

Name of RPAC or environment variable to set when comparison is true.

type

No

Must provide type of value as one of these strings slong32 or double (defaults to double).

value

No

Expected value (defaults to 0)

set-value

No

Value to assign to given variable if comparison is true (Defaults to true).

export

No

Boolean to determine if variable will be exported (defaults to false)

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<once>
   <set-environment-variable name="VALUE1" value="32"/>
   <set-environment-variable name="VALUE2" value="3.145"/>
</once>

<testcase name="Check greater than or equal 32">
   <if-numeric-value-ge-then-set name="VALUE1" variable="VALUE3" value="32" type="slong32"/>
</testcase>

<testcase name="Check greater than or equal 3.145">
   <if-numeric-value-ge-then-set name="VALUE2" variable="VALUE4" value="3.145" type="double"/>
</testcase>

<testcase name="Check greater than or equal 3.145">
   <if-numeric-value-ge-then-set name="VALUE2" variable="VALUE5" value="3.145"/>
</testcase>

<testcase name="Check greater than or equal 32">
   <if-numeric-value-ge-then-set name="VALUE1" variable="VALUE6" value="32" type="slong32" set-value="Value is 32"/>
</testcase>

9.24 if-numeric-value-gt-then-set

This tag asserts if an RPAC or environment variable is greater than an expected value then update RPAC variable to set value.

Table 14-156 if-numeric-value-gt-then-set

Attribute Required Description

name

Yes

Name of RPAC or the environmental variable to test.

variable

Yes

Name of RPAC or environment variable to set when comparison is true.

type

No

Must provide type of value as one of these strings slong32 or double (defaults to double).

value

No

Expected value (defaults to 0)

set-value

No

Value to assign to given variable if comparison is true (Defaults to true).

export

No

Boolean to determine if variable will be exported (defaults to false)

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<once>
   <set-environment-variable name="VALUE1" value="32"/>
   <set-environment-variable name="VALUE2" value="3.145"/>
</once>

<testcase name="Check greater than 32">
   <if-numeric-value-gt-then-set name="VALUE1" variable="VALUE3" value="32" type="slong32"/>
</testcase>

<testcase name="Check greater than 3.145">
   <if-numeric-value-gt-then-set name="VALUE2" variable="VALUE4" value="3.145" type="double"/>
</testcase>

<testcase name="Check greater than 3.145">
   <if-numeric-value-gt-then-set name="VALUE2" variable="VALUE5" value="3.145"/>
</testcase>

<testcase name="Check greater than 32">
   <if-numeric-value-gt-then-set name="VALUE1" variable="VALUE6" value="32" type="slong32" set-value="Value is 32"/>
</testcase>

9.25 if-numeric-value-le-then-set

This tag asserts if an RPAC or environment variable is less than or equal to an expected value then update RPAC variable to set value.

Table 14-157 if-numeric-value-le-then-set

Attribute Required Description

name

Yes

Name of RPAC or the environmental variable to test.

variable

Yes

Name of RPAC or environment variable to set when comparison is true.

type

No

Must provide type of value as one of these strings slong32 or double (defaults to double).

value

No

Expected value (defaults to 0)

set-value

No

Value to assign to given variable if comparison is true (Defaults to true).

export

No

Boolean to determine if variable will be exported (defaults to false)

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<once>
   <set-environment-variable name="VALUE1" value="32"/>
   <set-environment-variable name="VALUE2" value="3.145"/>
</once>

<testcase name="Check less than or equal 32">
   <if-numeric-value-le-then-set name="VALUE1" variable="VALUE3" value="32" type="slong32"/>
</testcase>

<testcase name="Check less than or equal 3.145">
   <if-numeric-value-le-then-set name="VALUE2" variable="VALUE4" value="3.145" type="double"/>
</testcase>

<testcase name="Check less than or equal 3.145">
   <if-numeric-value-le-then-set name="VALUE2" variable="VALUE5" value="3.145"/>
</testcase>

<testcase name="Check less than or equal 32">
   <if-numeric-value-le-then-set name="VALUE1" variable="VALUE6" value="32" type="slong32" set-value="Value is 32"/>
</testcase>

9.26 if-numeric-value-lt-then-set

This tag asserts if an RPAC or environment variable is less than an expected value then update RPAC variable to set value.

Table 14-158 if-numeric-value-lt-then-set

Attribute Required Description

name

Yes

Name of RPAC or the environmental variable to test.

variable

Yes

Name of RPAC or environment variable to set when comparison is true.

type

No

Must provide type of value as one of these strings slong32 or double (defaults to double).

value

No

Expected value (defaults to 0)

set-value

No

Value to assign to given variable if comparison is true (Defaults to true).

export

No

Boolean to determine if variable will be exported (defaults to false)

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<once>
   <set-environment-variable name="VALUE1" value="32"/>
   <set-environment-variable name="VALUE2" value="3.145"/>
</once>

<testcase name="Check less than 32">
   <if-numeric-value-lt-then-set name="VALUE1" variable="VALUE3" value="32" type="slong32"/>
</testcase>

<testcase name="Check less than 3.145">
   <if-numeric-value-lt-then-set name="VALUE2" variable="VALUE4" value="3.145" type="double"/>
</testcase>

<testcase name="Check less than 3.145">
   <if-numeric-value-lt-then-set name="VALUE2" variable="VALUE5" value="3.145"/>
</testcase>

<testcase name="Check less than 32">
   <if-numeric-value-lt-then-set name="VALUE1" variable="VALUE6" value="32" type="slong32" set-value="Value is 32"/>
</testcase>

9.27 if-numeric-value-ne-then-set

This tag asserts if an RPAC or environment variable is not equal to an expected value then update RPAC variable to set value.

Table 14-159 if-numeric-value-ne-then-set

Attribute Required Description

name

Yes

Name of RPAC or the environmental variable to test.

variable

Yes

Name of RPAC or environment variable to set when comparison is true.

type

No

Must provide type of value as one of these strings slong32 or double (defaults to double).

value

No

Expected value (defaults to 0)

set-value

No

Value to assign to given variable if comparison is true (Defaults to true).

export

No

Boolean to determine if variable will be exported (defaults to false)

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<once>
   <set-environment-variable name="VALUE1" value="32"/>
   <set-environment-variable name="VALUE2" value="3.145"/>
</once>

<testcase name="Check not equal 32">
   <if-numeric-value-ne-then-set name="VALUE1" variable="VALUE3" value="32" type="slong32"/>
</testcase>

<testcase name="Check not equal 3.145">
   <if-numeric-value-ne-then-set name="VALUE2" variable="VALUE4" value="3.145" type="double"/>
</testcase>

<testcase name="Check not equal 3.145">
   <if-numeric-value-ne-then-set name="VALUE2" variable="VALUE5" value="3.145"/>
</testcase>

<testcase name="Check not equal 32">
   <if-numeric-value-ne-then-set name="VALUE1" variable="VALUE6" value="32" type="slong32" set-value="Value is 32"/>
</testcase>

9.28 if-string-value-contains-then-set

This tag asserts if an RPAC or environment variable contains an expected value then update the RPAC variable to set value.

Table 14-160 if-string-value-contains-then-set

Attribute Required Description

name

Yes

Name of RPAC or the environmental variable to test.

variable

Yes

Name of RPAC or environment variable to set when comparison is true.

value

No

Expected value (defaults to empty string)

set-value

No

Value to assign to given variable if comparison is true (defaults to true).

case-sensitive

No

Case sensitive (defaults to false)

export

No

Boolean to determine if variable will be exported (defaults to false)

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<once>
   <set-environment-variable name="VALUE1" value="Alpha"/>
</once>

<testcase name="Assign Value2="true" if VALUE1 contains Alpha">
   <if-string-value-contains-then-set name="VALUE1" variable="VALUE2" value="Alpha"/>
</testcase>

<testcase name="Assign Value3="Is Alpha" if VALUE1 contains Alpha">
   <if-string-value-contains-then-set name="VALUE1" variable="VALUE3" value="Alpha" set-value="Is Alpha"/>
</testcase>

<testcase name="Assign Value4="true" if VALUE1 contains alpha">
   <if-string-value-contains-then-set name="VALUE1" variable="VALUE4" value="alpha" case-sensitive="false"/>
</testcase>

9.29 if-string-value-does-not-contain-then-set

This tag asserts if an RPAC or environment variable does not contain an expected value then update the RPAC variable to set value.

Table 14-161 if-string-value-does-not-contain-then-set

Attribute Required Description

name

Yes

Name of RPAC or the environmental variable to test.

variable

Yes

Name of RPAC or environment variable to set when comparison is true.

value

No

Expected value (defaults to empty string)

set-value

No

Value to assign to given variable if comparison is true (defaults to true).

case-sensitive

No

Case sensitive (defaults to false)

export

No

Boolean to determine if variable will be exported (defaults to false)

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<once>
   <set-environment-variable name="VALUE1" value="Alpha"/>
</once>

<testcase name="Assign Value2="true" if VALUE1 does not contain Alpha">
   <if-string-value-does-not-contain-then-set name="VALUE1" variable="VALUE2" value="Alpha"/>
</testcase>

<testcase name="Assign Value3="Is Alpha" if VALUE1 does not contain Alpha">
   <if-string-value-does-not-contain-then-set name="VALUE1" variable="VALUE3" value="Alpha" set-value="Is Alpha"/>
</testcase>

<testcase name="Assign Value4="true" if VALUE1 does not contain alpha">
   <if-string-value-does-not-contain-then-set name="VALUE1" variable="VALUE4" value="alpha" case-sensitive="false"/>
</testcase>

9.30 if-string-value-equal-then-set

This tag asserts if an RPAC or environment variable is equal to an expected value then update the RPAC variable to set value.

Table 14-162 if-string-value-equal-then-set

Attribute Required Description

name

Yes

Name of RPAC or the environmental variable to test.

variable

Yes

Name of RPAC or environment variable to set when comparison is true.

value

No

Expected value (defaults to empty string)

set-value

No

Value to assign to given variable if comparison is true (defaults to true).

case-sensitive

No

Case sensitive (defaults to false)

export

No

Boolean to determine if variable will be exported (defaults to false)

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<once>
   <set-environment-variable name="VALUE1" value="Alpha"/>
</once>

<testcase name="Assign Value2="true" if VALUE1 equal Alpha">
   <if-string-value-equal-then-set name="VALUE1" variable="VALUE2" value="Alpha"/>
</testcase>

<testcase name="Assign Value3="Is Alpha" if VALUE1 equal Alpha">
   <if-string-value-equal-then-set name="VALUE1" variable="VALUE3" value="Alpha" set-value="Is Alpha"/>
</testcase>

<testcase name="Assign Value4="true" if VALUE1 equal alpha">
   <if-string-value-equal-then-set name="VALUE1" variable="VALUE4" value="alpha" case-sensitive="false"/>
</testcase>

9.30 if-string-value-not-equal-then-set

This tag asserts if an RPAC or environment variable is not equal to an expected value then update the RPAC variable to set value.

Table 14-163 if-string-value-not-equal-then-set

Attribute Required Description

name

Yes

Name of RPAC or the environmental variable to test.

variable

Yes

Name of RPAC or environment variable to set when comparison is true.

value

No

Expected value (defaults to empty string)

set-value

No

Value to assign to given variable if comparison is true (defaults to true).

case-sensitive

No

Case sensitive (defaults to false)

export

No

Boolean to determine if variable will be exported (defaults to false)

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<once>
   <set-environment-variable name="VALUE1" value="Alpha"/>
</once>

<testcase name="Assign Value2="true" if VALUE1 not equal Alpha">
   <if-string-value-not-equal-then-set name="VALUE1" variable="VALUE2" value="Alpha"/>
</testcase>

<testcase name="Assign Value3="Is Alpha" if VALUE1 not equal Alpha">
   <if-string-value-not-equal-then-set name="VALUE1" variable="VALUE3" value="Alpha" set-value="Is Alpha"/>
</testcase>

<testcase name="Assign Value4="true" if VALUE1 equal not alpha">
   <if-string-value-not-equal-then-set name="VALUE1" variable="VALUE4" value="alpha" case-sensitive="false"/>
</testcase>

10. Misc Tags

This section describes the miscellaneous tags.

10.1 clear-all-measures

This tag clears all measures changed since starting RPAC.

Table 14-164 clear-all-measures

Attribute Required Description

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<testcase 
   name="clear all measures">
   <clear-all-measures/>
</testcase>

10.2 fail

This tag creates a failure message.

Table 14-165 fail

Attribute Required Description

msg

No

Message to used in failure text

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


10.3 log

This tag logs a message to the console.

Table 14-166 log

Attribute Required Description

msg

No

Message to be logged to the console

level

No

Level to log message at

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)


Example:

<log level="basic" msg="Testing log tag"/>

10.4 reset-seq-generator

This tag restarts a SQL sequence generator back to 1.

Table 14-167 reset-seq-generator

Attribute Required Description

skip

No

Skip this tag if true (defaults to false)

stop

No

Stop rpac execution if true (defaults to false)

debug

No

Wait for debugger if true (defaults to false)