Adding test steps from the General catalog
When you want to add a log statement, verification point, and variable assignment as a step, you can add those steps from the General catalog. You can also add pausing of the test for a specific duration as a test step.
Before you begin
- 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.
-
Select an element from the General catalog in the
Catalog tab to perform the steps as follows:
Catalog element Description Action Verify 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. Perform the following steps: - Drag and drop the Verify element under any test step as required.
- Click the Verify step.
The step details pane is displayed.
- 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.
- In the third column, enter a variable or value to be compared with the value of the selected variable in the first column.
Assign You can assign a value to an existing variable or a new variable. Perform the following steps: - Drag and drop the Assign element under any test step as required.
- Click the Assign step.
The step details pane is displayed.
- Select an existing dataset in the Dataset field.
- Click Add to add a variable and assign the value from dataset.
- Select an existing variable from the Select a variable to
assign drop down.Note: You can also select Add new variable from the list to create a new variable and assign the value from the dataset.The variable is displayed in the Variables section.
- Click the drop-down icon
in the
variable.The variables in the test and column names in the selected datasets are listed.
- Select the column in the dataset from which you want to assign the values during test run.
Log You can insert a custom log statement in a test as a step. The inserted log statement is printed in the Console window and the Functional report. For example, you can add a custom statement to demarcate the test steps related to order generation, user creation, or report generation in an application or you can use a log statement to display the value of a variable.
Perform the following steps: - Drag and drop the Log element under any test step as required.
- Click the Log step.
The step details pane is displayed.
- Enter a custom message in the Log statement text box.
Pause You can add Pause as a step in the recorded test for a specified duration. You can specify the pause duration in milliseconds, seconds, minutes, or hours. Perform the following steps: - Drag and drop the Pause element under any test step as required.
- Click the Pause step.
The step details pane is displayed.
- Specify the amount of time that the step must pause in Duration.
- Select the unit of time for the timeout in
Unit.
Alternatively, you can select the Code checkbox to enter the time and unit in the Duration text box.
- Optional: Enter a message to indicate the reason for the pause in the Note text box.
-
Click the Save icon
to save the modifications.