DefaultRunDataDrivenTestCase Function

Action

Populates the records for a data-driven test case and runs the test case using those records.

Syntax

void DefaultRunDataDrivenTestCase (sTestCaseName[,lsRowsToRun])
Variable Description
sTestCaseName the name of the test case to run. STRING.
lsRowsToRun

Optional: A list of queries which define the rows to run, or which specify that the sample record should be run. If this argument is not passed in, then all rows for all tables are executed. LIST OF STRING.

Specification of lsRowsToRun:

  • If NULL, all rows will be run for all tables.
  • At most, one string may be passed for each table. The string can have one of the following forms:
    • USE_SAMPLE_RECORD_<Table>: Only the sample record is used for <Table>.
    • select * from ""<Table>"" where ...: The query is executed in order to collect the rows to run for <Table>.
    • If no string is passed for a table, then all rows are executed for that table.

The statement used to run the test case is:

[ ] @(sTestCaseName) (laDataRecords)

Notes

This function runs the data-driven test case once for every combination of specified rows. For each table used by the test case, the function fetches the specified rows from the database or uses the sample record in the data-driven test script file.

The function relies on the native typecasting of a LIST OF ANYTYPE to a record type, so that the test cases are responsible for type-checking.

In accordance with standard recovery system functions, DefaultRunDataDrivenTestCase() can be overridden by RunDataDrivenTestCase().