Steer body Module Attributes

You can create body Module Attributes from the body of your message or via file. To steer body Module Attributes that you created from the message body, modify the columns Value and ActionMode as described in chapter "ActionModes".

To steer Body Module Attributes that you created via file, follow the steps below:

  1. Go to your XTestStep and select the body Module Attribute.

Body Module Attribute from file

The ActionProperty File and the file path are added automatically in the Value column, when you create the body Module Attribute.

  1. Set an ActionMode.

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

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

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

The ActionProperty File ensures that the file path is resolved. It should be used for all file operations.

If you add a file path without this ActionProperty, the path is treated as a normal value and not resolved.

In this example you verify a body Module Attribute in your response message that you save to file.

To do so, create a body Module Attribute using Save to File ....

Save to File ...

Go to your XTestStep and select the Body Module Attribute.

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

Verify Body Module Attribute

The TestCase is now ready to be run.

Tosca verifies that the content of the file equals the value of the body Module Attribute.

TestCase in ScratchBook