Set ActionModes

A message consists of message elements, such as an ID, address, or name. In an OSV Scenario, Module Attributes represent these message elements. To steer these Module Attributes during your test activities, you can modify their ActionModes and, optionally, their values.

ActionModes determine how to use the value of a message element. For your OSV Scenarios, you can use them as follows:

  • For inbound messages, use the ActionModes WaitOn, Verify, Buffer, and Constraint.

  • For outbound messages, use the ActionModes Insert, Input, and Buffer. You can use Insert and Input interchangeably.

ActionMode WaitOn

Use WaitOn to identify a Scenario through a value (see chapter "Ways to design your Scenario").

This ActionMode has the following specifications:

  • WaitOn is mandatory for all inbound messages in OSV.

  • You can enter literal expressions, an asterisk (*) as a wildcard, dynamic expressions, or regular expressions as values. Additionally, you can work with operators, such as greater or smaller than.

  • The WaitOn-check is case-sensitive for OSV Scenarios. If you used case-insensitive matching in your Scenarios, you have to adapt the values or use a regular expression as described below.

  • TheWaitOn-check is case-insensitive for JSON and XML messages that don't contain lists.

  • The date format you specify during Scenario design must match the date format during Scenario execution (see chapter "Enter date and time").

    If the date format in the system under test and the base date in Tosca Commander don't match, you must specify the date format as the third parameter of the date expression. The base date of the OSV Host is specified in the file <Tosca OSV program files>\Host\Tricentis.OSV.Environment.exe.config.

Example values:

Value

Result

*

Any string

AX*

Any string starting with AX.

Example: AX1234, AXANYVALUEEUEUEU, AX

*AX

Any string ending with AX.

Example: 123AX, BCAAAX, AX

< 5

Any number smaller than 5.

Example: -5, 0, 1

!= {DATE}

Any date, except for the current date.

Example: 2010-01-01

< {DATE[11/03/2015][][MM/dd/yyyy]}

Any date before November 3, 2015.

(?i)test

Any case-insensitive match.

Example: test, Test, TEST, teST.

ActionMode Verify

Use Verify in inbound messages to verify values.

This ActionMode has the following specifications:

  • You use this ActionMode to verify whether the value in a message matches the value in the Scenario.

  • You can use literal and regular expressions.

ActionMode Buffer

Use Buffer in messages to save values.

Later, you can use these values as input or for verifications. Make sure to assign meaningful names to your buffer values, so you can find them again.

This ActionMode has the following specifications:

  • OSV writes values from in- and outbound messages into the buffer.

  • In inbound messages, you use buffer values for verification (Verify).

  • In outbound messages, you use them for inserting (Insert) (see chapter "Use buffer and green buffer").

  • You can use buffer values in the same message. For instance, to verify other message elements in the message.

ActionMode Constraint

Use Constraint to restrict the search for a parent node.

For more information on this ActionMode, see chapter "Use ActionMode Constraint".

ActionMode Insert

In Tosca OSV, you can use the ActionModes Insert and Input interchangeably to insert message elements in outbound messages.

This ActionMode has the following specifications:

  • If you leave the value empty, OSV inserts the message element without a value.

  • If you enter a value, OSV inserts the message element with the specified value.