Auto create pattern matching parameters

You can use the OSV Auto Pattern Matching feature to automatically create pattern matching parameters for your OSV Scenarios.

The OSV Auto Pattern Matching feature is part of the API & OSV Early Access components.

The API & OSV Early Access components are in the Early Adopter phase. Tricentis does not guarantee full functionality or usability in the current or in future Tricentis Tosca versions.

The feature offers the following options:

The OSV Auto Pattern Matching feature also helps you to design your OSV Scenarios by automatically adding weights and searching for identifiers.

Create pattern matching parameters for an existing Scenario

To create pattern matching parameters for an existing Scenario, follow the steps below:

  1. In Tosca Commander, select the Scenario you want to create pattern matching parameters for.

  2. In the OSV menu, click Auto.

Click Auto

The system searches the Module connected to the Scenario and adds pattern matching parameters to the Module and the Scenario. This includes pattern matching parameters for Method and Resource of inbound messages.

Auto pattern matching parameters

For information on how to steer pattern matching parameters in your Scenario, see chapter "Configure OSV Scenarios".

Create pattern matching parameters when importing messages

To create pattern matching parameters when importing messages from OSV, follow the steps below:

  1. Enable the OSV Auto Pattern Matching feature.

  2. Import your messages as a single Scenario as described in chapter "Import recorded messages".

  3. In the subsequent dialog, click Yes.

Question dialog for pattern matching parameters creation

The system automatically adds the pattern matching parameters to the Module and the Scenario. This includes pattern matching parameters for Method and Resource of inbound messages.

Added pattern matching parameters

For information on how to steer pattern matching parameters in your Scenario, see chapter "Configure OSV Scenarios".

Automatically add weights

Several messages can be identical, i.e. they have the same automatically created pattern matching parameters and values. When messages are identical, Tosca OSV could assign them to several Scenarios when you run your Scenarios in an OSV environment.

This prevents OSV from continuing pending Scenarios, because OSV cannot assign several identical messages to one Scenario at the same time.

To assign the messages correctly, the OSV Auto Pattern Matching feature automatically creates decreasing weights for these messages. With the help of these weights, OSV knows in which order to assign the identical messages.

The system creates the weights based on the recording order, i. e. the message you recorded first, has the highest weight (see chapter "Record messages").

Identical inbound messages with different Weight

The system uses integer numbers to specify the weight of a message. The DefaultValue is 0.

For more information on how to manually specify the weight of a message, see chapter "Use the Virtualization tab".

Automatically search for identifiers

The OSV Host uses the values of specific message elements as identifiers to start or resume Scenarios. With the help of these identifiers, the system assigns inbound messages to the respective Scenario.

To find a potential identifier, the OSV Auto Pattern Matching feature searches the headers of inbound messages.

If it finds an identifier that several messages have in common, the system automatically creates a green buffer with the prefix $ for it. These are the only buffers OSV validates for identification elements.

In this example you use the Auto Pattern Matching Creation feature on a Scenario.

The system automatically searches the message headers for a potential identifier. It finds the identifier Host.

Host in the Headers section

The system automatically creates a green buffer with the prefix $ for the identifier.

Identifier Host

For more information on identifiers and green buffers, chapter "Ways to design your Scenario".