Steer attachment Module Attributes

You can create Module Attributes from message attachments and steer them in your OSV Scenarios. For example, you can verify the content of an attachment.

To work with attachment Module Attributes in OSV, make sure that the attachment files are available on the OSV Host machine.

To steer attachment Module Attributes, follow the steps below:

  1. In Tosca Commander, go to your XTestStep.

  2. Select the attachment that you want to steer.

  3. Add the ActionProperty File and the file path in the Value column.

    • File ensures that the file path is resolved correctly and not as a normal value.

    • Use the file path of the file you want to insert, save to, or verify against.

    • Optionally, use an index or wildcard in the file path. For example, if the name of the attachment changes with every request.

Attachment Module Attribute

  1. Set an ActionMode.

    • To insert the content of the file into the Module Attribute, use Insert.

    • To save the content of the Module Attribute to the file, use Select.

    • To verify that the content of the file equals the value of the Module Attribute, use Verify.

In this example, you want to verify an attachment in your response message. This means that you want OSV to verify that the content of a file equals the value of the attachment Module Attribute.

To do so, you create an attachment Module Attribute.

Then you navigate to your XTestStep and select the attachment. You add the ActionProperty File and the file path in the Value column.

To verify that the content of the file equals the value of the Module Attribute, you set the ActionMode to Verify.

Verify Attachment_1

In this example, you want to save the attachment in a response message to file. The attachment name is dynamic; it changes with every request.

First, you create an attachment Module Attribute. .

Then you navigate to the XTestStep. You select the attachment and add the ActionProperty File and the file path in the Value column. Since you don't know the exact name of the file, you use a wildcard (*) in the file path.

To save the file, you set the ActionMode to Select.

Save attachment with a dynamic name