Parameterize XML data

Relevant for: API testing only

This task describes how to parameterize XML data. This enables you to replace a constant value in the XML schema with a data source expression.

  1. Prerequisites

    Create a test step that uses XML text in the request body. This applies to Network and XML type activities. If you intend to parameterize the data with a data source, import or create the data source.

  2. Add the XML body text

    1. Using the Properties pane, open the HTTP tab .
    2. Click the Load File button and load an XML file or paste XML code directly into the Body area.
  3. Select the text to parameterize

    1. In the HTTP tab, select Text from the Body type drop-down list.

    2. In the Body area, select the text value that you want to replace and select Link to Data Source from the right-click menu.

  4. Select a link source

    In the Select Link Source dialog box, select a data source type, such as Available steps or Data source column. Select the node that you want to use for parameterization. Click Add. Note that the expression changed.

  5. Verify the value in the Properties pane

    In the Properties pane, check the Body area, and verify that the constant value was replaced with the data source expression.