This task describes how to create value sets for XML parameters.
Value sets are arrays that contain a set of values. Using the Add Column and Duplicate Column buttons, you can create multiple value sets for your parameter and use them for different iterations.
When using value sets, the number of array elements per parameter does not have to be constant.
You can use optional elements that will appear in one value set, but not in another. This allows you to vary the values you send for each of the iterations—some iterations can include specific array elements, while other iterations exclude them.
To exclude an optional element, click the small triangle in the upper left corner of the cell and insure that it is not filled in.
In the following example, Set 1 and Set 2 use the optional elements: name, street, and state. Set 3 does not use a street name.
View the Parameter Properties.
Open the Data Parameterization box.
Define value sets for the XML parameter.
Create additional value sets.
Handle the <any> elements.
Add Array Element. Adds a sub-element under the root element.
Insert child. Adds a sub-element to the selected element.
Insert sibling. Adds a sub-element on the same level as the selected element.
Load XML. Loads the element values from an XML file.
Save XML. Saves the array as an XML file.
Copy XML. Copies the full XML of the selected element to the clipboard.
Remove unwanted columns.
Save the changes.
If the Parameter Properties dialog box is not open, select Vuser > Parameter List and select the desired parameter. The dialog box shows a read-only view of the parameter values.
Click the Edit Data button to open the Data Parameterization dialog box.
In the Set columns, insert values corresponding to the schema.
If a row says NIL, it implies that the element is nillable. To include a value for the nillable element, enter the value as usual. To mark a value as nil, click the NIL icon to fill it in. This erases any value that you may have assigned to the element. In the following example, the city element is nillable, but it is only marked as nil in Set 2 and Set3—not in Set 1.
To insert more value sets, click Add Column and insert another set of values in the new column. To copy an existing value set, select a row in the value set you want to copy and click Duplicate Column.
To duplicate an array element and its children, select the parent node and choose Duplicate Array Element from the right-click menu.
For any type elements, right-click <any> in the Schema column and select one of the available options. These options may vary depending on the location of the cursor.
Click the Rename text to provide a meaningful name for each array element.
To remove a value set, select it and click Delete Column.
Click Apply to save the changes and update the view in the Parameter Properties dialog box.