Set an index, notation or result count
Depending on your payload, you can specify a list entry in one of three ways:
-
Set an index on the XTestStep to verify a specific list entry.
You can use an index on the whole list, rather than setting ActionMode Constraint on individual elements.
Use this option if your list consists of name-value-pairs (see example below).
-
Set a notation to verify a specific list entry.
Unlike the index, the notation is added to the name field of individual XTestStepValues. This enables you to use both values and notations.
Use this option if your list consists of values (see example below).
-
Set a result count to verify how many times a specific list entry appears in a list or how many attachments a response contains.
The result count is added in the value field of the individual XTestStepValues (see example below).
Set an Index
To set an index, follow the steps below:
-
Go to your XTestStep and select the parent item.
-
In the Value drop-down menu, enter one of the following values:
-
Index == <result>
-
Index == Last to verify the last item on the list.
-
-
Set the ActionMode to Verify.
Work with Index
Set a notation
You can use a notation on the XTestStep to verify a specific list entry. This notation has to begin with $.
To set a notation, follow the steps below:
-
Go to your XTestStep and select the respective XTestStepValue.
-
In the Name field of this XTestStepValue, specify the list entry. There are two ways to do so:
-
To specify the number of the list entry to be verified, enter $ and the respective number.
-
To verify the first or last entry on your list, enter $first or $last.
-
-
From the Value drop-down menu, select the value that you want to verify.
-
Set the ActionMode to Verify.
Add notation and value
Set a result count
You can use result count to verify how many times a specific list entry appears in a list, or to verify how many attachments a response contains.
To do so, follow the steps below:
-
Go to your XTestStep and select the respective XTestStepValue.
-
In the Value drop-down menu, enter ResultCount == <result>
-
Set the ActionMode to Verify.
Use ResultCount