The following flow-based actions are available for IBM Rational Integration Tester tests:
An Action Group combines multiple actions and treats them as a single test step. For example, you can use an action group to control how subscription-based operations are started and how they process their received messages. Messages in an Action Group are processed in parallel, as opposed to one after the other when used as normal steps in a test sequence.
A failure within an action group does not propagate to the Action Group container within the test tree. After you start the execution sequence for an Action Group, that sequence is independent of the execution of the containing test.
In the example that is shown below, an Action Group contains two subscribers on different subjects. When executed, the test starts both subscribers and validates their corresponding messages, regardless of the order in which they are received. The Action Group is considered complete after both messages are received.
In the following example, two subscribers have the same subject (that is, they both receive the first subject message simultaneously). This enables separate filters to be applied at the same time.
The Assert action is a conditional action that lets the user construct a list of expressions that determine whether a test proceeds. If the Assert action passes, the test continues. If the Assert action fails, the test fails and no further test actions are executed.
Expressions must evaluate to true or false. Any other result causes the test to fail with a console message that identifies the non-boolean result.
To enter an expression, click Add and type into the empty input field. To remove an expression, select it and click Delete. To test the expressions, click Test and enter temporary values for any tags shown.
For more information about list tags, see Tags and repeating elements.
By default, multiple expressions are joined with a logical AND, meaning that all expressions must pass in order for the action to pass and for the test to proceed. To join expressions with a logical OR, enable the ‘OR’ Expressions option, which means that only one of the expressions needs to pass in order for the action to pass and for the test to proceed.
A Decision is a conditional action, the body of which is essentially a function and whose result controls test flow. A Decision can have one of two outcomes: true or false.
Any Rational Integration Tester function can be added as an expression from the Decision editor menu (for example, simple expressions by using XPath value comparison operators, such as equals, less than). Expression arguments can be tags or literals.
Expressions must evaluate to true or false. Any other result causes the test to fail with a console message that identifies the non-boolean result.
Multiple expressions are processed as being joined by a logical AND. To override (that is, join them with a logical OR), enable the ‘OR’ Expressions option.
To enter an expression, click Add and type it into the empty input field. To remove an expression, select it and click Delete. To test the expressions, click Test.
For more information about list tags, see Tags and repeating elements.
You can drag another action onto the branches of a Decision action. For example, you can drag a Log action onto the False branch to send a message to the console with information about the negative outcome of the Decision function.
When a Pass action is encountered during the execution of a test, the test is deemed to pass and execution jumps to the Tear-down step. This action is commonly used as one of the paths under a decision step to make a test pass its current iteration.
In the Pass action editor, you can set the location of the logging output file by typing the full path to the file, which can include tags, and then clicking Browse to locate the file, or by selecting an entry from a list of the most recently used files. If no output file is set, no logging occurs.
Once an output file is designated, two more file options can be enabled/disabled: Append and Flush.
When a Fail action is encountered during the execution of a test, the test is deemed to fail and execution jumps to the Tear-down step. This action is commonly used as one of the paths under a Decision step to force a test to fail its current iteration.
In the Fail action editor, you can set the location of the logging output file by typing the file’s full path (which can include tags), clicking Browse to locate the file, or by selecting an entry from a list of the most recently used files. If no output file is set, no logging occurs.
Once an output file is designated, two more file options can be enabled/disabled: Append and Flush .
The Run Test action executes another test as a step (subtest) of the current test.
The following table describes the general options available for the action under the Config tab:
Run Settings | |
Test | Click Browse to select the test to execute. Click Clear to reset the field. |
Run process in parallel | Enable this option to execute the selected test in parallel
with the parent test (that is, the test that contains this Run Test
action). Note: If this option is enabled,
the Store tab is unavailable.
|
Parallel Settings (used with "Run process in parallel") | |
Parent waits for child to complete | The parent test waits for the selected test to finish before it terminates. |
Child exits when parent completes | The selected test is terminated as soon as the parent test is finished executing. |
Child Subscriber Settings (controls message delivery when parent and child tests subscribe to the same message subjects) | |
Default | Use independent subscribers in parallel and shared subscribers in series. |
Shared | Separate message queues deliver messages to both processes. |
Independent | Subscribers retrieve messages in turn from a single message queue. |
Within the Run Test action, the Value and Store pages are used to pass data between the parent and child tests.
Input and output tags are optional. You can run the child test without passing any data between the two tests.
A sleep action stops a test’s execution for a specified period, in milliseconds. You can specify a fixed time, a uniformly distributed random time, or a random time with Gaussian distribution. The time range for the Uniform and Gaussian delay is defined by the values that are used in the Minimum Delay and Maximum Delay fields).
A sleep action can be used to make a test wait to ensure that some previous processing is complete, or for simulating delays in adapter stubs.
The Fetch Test Data action can be used to map data from a test data source to existing test tags.
Click Browse to locate and select the data source from the project resource dialog. The "Group data by column" list, which is sorted alphabetically, facilitates with working with test data sets containing repeating elements. The column that uniquely defines the rows that belong to the group (usually a parent ID) must be selected.
In the Mappings section, select the data source field to map for each of the wanted tags.
If you run the Fetch Test Data option in multiple iterations, select the After this row has been mapped, advance to the next row option to map the next row of data for each subsequent iteration. If you do not select this option, each iteration reads the same row of data over and over.
The Lookup Test Data action provides keyed access to a data set. For example, a stub might receive a request message and tag value for customerName. You can search the data set, keying off the customerName, and returning data that you can use to send a reply.
The action has two pages, where you can complete the following fields:
Field | Description |
---|---|
Config page | |
Test data set | The data set, previously configured in IBM Rational Integration Tester (see Test data sources), to use for looking up data. |
Lookup values | The Column Key within the data set to use as the lookup key, and the Lookup Value to search for within the data set that is based on that key. The value is likely to be dynamic and come from a tag that is populated earlier in the test sequence. To use multiple columns, click Add Lookup. To remove a column, select it and click Remove Lookup. |
Store page | |
Output format | Select Store all matching rows into lists to write list tags instead of single values. See Tags and repeating elements. |
Data field | The column value from a returned row in the data set to which the tag is mapped. For example, if %%customerName%% is found, then the values in the ADDRESS and PHONE columns of the same row are mapped to tags named %%Address%% and %%Phone%%. |
Tag name | The name of an existing tag within the test. Alternatively, you can click the pencil icon at the right side of the field to create a tag name. |
Like the Decision action, Lookup Test Data provides two execution paths. If a row is found in the data set, the Found branch is executed. Otherwise, the Not Found branch is executed. More actions can be added to the two paths to provide different success or failure results.
When you specify test iterations with the Creates new test iteration option selected, the built-in tag TEST/ITERATION/NUMBER is set to 1 and is incremented for each loop inside the iterator. During the test, the Progress column in Test Lab displays the progress as a percentage of the current iteration against the total iterations.
The Iterate action specifies an action or group of actions to be executed multiple times. Actions within the Iterate action are run for the specified range of iterations only.
The following options are available for configuring the action:
Option | Description |
---|---|
Iterations | The numbers of the specific iterations to be run. For example,
if you specify "1,3", no results are stored for the second iteration
or any iterations from 4 on. You can include tags, as in the following
example:
If you specify "9", Rational Integration Tester does not run nine iterations; only the ninth iteration is run. See also Iterating through multi-value tags in this topic. |
Pacing | The following options are available in the Pacing section:
|
Runtime settings | The following options are available:
|
Iteration timing | The following time limit options are available:
|
The Iterate Test Data action, similar to the Iterate action, specifies an action or group of actions that can be executed multiple times. The number of iterations, however, is controlled by the number of filter matches found in the selected data set.
The following options are available for configuring the action:
Option | Description |
---|---|
Test data set | The data set to search. |
Group data by column | The (optional) column within the selected data set to use as the basis for repeating elements. When used, all rows within the data set that have the same value in the "grouping" column are grouped and sorted alphabetically as repeating elements. |
Iterations | The numbers of the specific iterations to be run. For example,
if you specify "1,3", no results are stored for the second iteration
or any iterations from 4 on. You can include tags, as in the following
example:
If you specify "9", Rational Integration Tester does not run nine iterations; only the ninth iteration is run. If you specify
an iteration number that is higher than the highest row number in
your test data, one of the following results occurs:
See also Iterating through multi-value tags in this topic. |
Pacing | The following options are available in the Pacing section:
|
Runtime settings | The following options are available:
|
Iteration timing | The following time limit options are available:
|
Under the Filter tab, you can specify values to match in columns within the data set. If no filters are specified, everything passes the filter. Text that is entered under the Required Value field is used as an "Equality" match by default. To modify the filter type, click the icon, select the appropriate filter action, and enter the matching criteria as needed.
Only the rows that contain data that matches all filters are used. If the Disable filter when Tag is empty option is selected, the filter is not applied when an empty value ('''' or NULL) is found in the tag.
Under the Store tab you can map the data in specific columns (within matching rows) to existing tags in the test.
Use the Iterate While action to specify an action or group of actions that is to be executed as long the specified conditions are met. One or more conditions can be specified.
The following options are available for configuring the action:
Option | Description |
---|---|
Condition | Complete the following steps:
|
Iterations | The numbers of the specific iterations to be run. For example,
if you specify "1,3", no results are stored for the second iteration
or any iterations from 4 on. You can include tags, as in the following
example:
|
Pacing | The following options are available in the Pacing section:
|
Runtime settings | The following options are available:
|
Iteration timing | The following time limit options are available:
|
For Iterate and Iterate Test Data actions, you can specify a tag that contains a list (a multi-value tag) rather than a literal number.
For example, assume your test begins with an SQL Command action that reads through a table of user names and passwords and then stores the value for each cell that it finds from the UserName column in a list in the UsersList tag. You can then specify "%%UsersList%%" in the Iterations field of an Iterate or Iterate Test Data action, and the action will repeat the test steps for each row of the table.
On the Store page, you can copy the current value of the multi-value tag (UsersList in the example) to another tag.
For more information, see Tags and repeating elements.