Create Module Attributes from XML messages containing CDATA

The Tricentis Tosca API Engine enables you to create XML-based Module Attributes from messages that contain CDATA sections. The content within the CDATA section of the message payload is recognized as either XML, JSON or normal textual data. If the CDATA section contains valid XML documents, the API Engine recognizes them as such.

If the content within your CDATA section is a proper XML or JSON content, you cannot entirely overwrite it using the Insert ActionMode in a TestCase from the top level, you can only modify the subnodes within such an XML or JSON content via the Insert ActionMode.

To steer the values of XML tags embedded in a CDATA section, you can create XML-based Module Attributes.

To do so, follow the steps below:

  1. Select a Module and access the API Testing menu.

  2. Select the message payload.

  3. Click Add in the API Testing menu.

The created Module Attributes are organized in a hierarchical structure based on the tag structure of the CDATA section.

ModuleAttributes created from CDATA elements

The created Module Attributes have the same names as the elements you marked.