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.
-
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.
-
Add the XML body text
- Using the Properties pane, open the HTTP tab .
- Click the Load File button and load an XML file or paste XML code directly into the Body area.
-
Select the text to parameterize
-
In the HTTP tab, select Text from the Request Body type drop-down list.
-
In the Body area, select the text value that you want to replace and select Link to Data Source from the right-click menu.
-
-
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.
-
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.