Adding a variable verification step
You can verify the values assigned to a variable. You can compare the values of two variables or compare the variable value with a constant value.
Before you begin
You must have completed the following tasks:
- Ensured that you are assigned a Team Space Owner, Project Owner, or Member with a Tester role to create or edit a test resource.
- Read and understood the information in Edit branch overview and Create or select an Edit branch.
- Ensured that your project contains a Web UI test.
- Opened the test in Test Editor. See Editing a Web UI test.
Procedure
-
Click the
button displayed on the Test
Editor page.
The Edit button appears only when no active edit branch is selected.
Alternatively, right-click the test in the test navigator panel and select Edit.
The Edit branch dialog is displayed.If the Edit branch dialog is not displayed, then go to step 3. - Select an existing edit branch or create a new edit branch.
- Drag and drop the Verify element under any test step as required from the General catalog in the Catalog tab.
-
Click the Verify step.
The step details pane is displayed.
-
Perform the following steps in the step details pane:
- Click Click here to add a row to provide values to be verified under Verification Points.
- Enter variable name in the first column.
- In the operator field, select an option to indicate the basis of comparison of the
two operands.The available operators are as follows:
- Contains
- Ends with
- Code
- Matches regex
- File contents
- Starts with
- Equals
- Equals variable
- Doesn't equal variable
- Doesn't match regex
- Doesn't have file contents
- Doesn't contain
- Doesn't start with
- Doesn't end with
- In the third column, enter a variable or value to be compared with the value of the selected variable in the first column.
-
Click the Save icon
to save the modifications.