Lesson 7: Use the Comparator to update a verification point
You can use the Verification Point Comparator to compare verification point data after you play back a script. Verification points provide a baseline of the properties or data of an object. If the verification point fails on a subsequent build of an application, you have found a defect or an intentional change to the application. If the change is intentional, you can update the information in the verification point so that the test continues to be valid for future builds.
To start at the beginning of the tutorial, see the HCL DevOps Test UI (Test UI) Tutorial.
At the end of lesson 6, you left the log open. If you closed the log, reopen it by double-clicking on the log name in the Solution Explorer.
- In the log, click the View Results link at the end of the failed image
verification point entry. The event heading is "Verification Point (Album_image)."
The Test UI Verification Point Comparator displays your verification point data. Notice that the Comparator banner includes the name of your verification point.
Problems with the comparator?: If the comparator does not open or you get an error message, you need to enable the Java™ plug-in of your browser. For the instructions to do that, see the topic called "Enabling the Java™ Plug-in of a Browser" in the "Before You Record" section of the Test UI Help.When a verification point fails, the Comparator shows the expected and the actual values to help you analyze the differences. You can then load the baseline file and edit it or update it with the values from the actual file. Failures are displayed in red.
When you created the verification point on ClassicsA, the captured album image is based on the object
javax.swing.JLabel
. When you played back the script on ClassicsB, since the height and the width of the objectjavax.swing.JLabel
is different, the image verification point failed. So you must update the baseline file to change the object to match ClassicsB. - Click the Load Baseline to Edit button () on the Comparator toolbar.
- Click the Replace Baseline with actual value button () on the Comparator toolbar.The actual image is loaded as the baseline image.
- Close the Comparator.
- In the log, click the View Results link at the
end of the failed verification point entry. The event heading is "Verification
Point (OrderforTrentCulpito_standard)."
The Test UI Verification Point Comparator displays your verification point data. Notice that the Comparator banner includes the name of your verification point. (Note: if you get an error message and the Comparator does not open, click here.)
When a verification point fails, the Comparator shows the expected and the actual values, to help you analyze the differences. You can then load the baseline file and edit it or update it with the values from the actual file.
Failures are displayed in red.
-
Scroll to the text property.
When you created the verification point on ClassicsA, the banner title was "Order for Trent Culpito." When you played back the script on ClassicsB, the banner title was "Orders for Trent Culpito." "Orders" is correct, because a customer may have multiple orders in the Orders dialog. So you must update the baseline file to change the text to match ClassicsB.
You can edit only the baseline file.
-
Click the Load Baseline to Edit toolbar button on the Comparator toolbar.
Notice that the left Value column displays the Baseline Value now.
-
Instead of scrolling to the text property, you can click the Jump to First Difference button above the Property column.
The four navigation buttons help you locate the differences between the baseline and actual files.
You can update the baseline file in two ways. You can edit that cell of the grid, adding the letter s to the word "Order," or you can use the Replace Baseline command. Replacing the baseline replaces all values from the baseline file with the values from the actual file. In general, if you need to edit only one or a small number of values, you should edit the individual values.
-
This test has only one difference to update, so click the Replace Baseline with actual value button on the Comparator toolbar.
Both values in the text property now match and the property no longer appears in red.
For more information about using the Comparator, see the Verification Point Comparator or Comparing and Updating Verification Point Data Using the Comparator.
-
Close the Comparator.
Now we will play back the script again to confirm the verification point passes, given the updated the baseline value for the failure.
-
Close the log first.
-
Click the Run Functional Test Script button.
-
Select the Classics log if necessary and click Finish.
-
Click Yes if prompted to overwrite the log.
Test UI pauses on the Member Logon dialog, because you did not fix that recognition problem yet. At the end of playback, Test UI displays the log. The verification point now passes! See how easy it is to use the Comparator to update object data and properties to account for changes in the application under test.
-
Leave the log open.
Advance to Lesson 8: Update the object map.