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.
Before you begin
Procedure
-
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 Rational® Functional Tester 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 Rational® Functional Tester 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 properties verification point entry. The event heading is "Verification Point (OrderforTrentCulpito_standard)."
-
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 might have multiple orders in the Orders window. So you must update the baseline file to change the text to match ClassicsB.
You can only edit the baseline file.
-
Click the Load Baseline to Edit 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 few 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 Rational® Functional Tester Help.
-
Close the Comparator.
Now we will play back the script again to confirm the verification point passes, given the updated baseline value for the failure.
- Close the log.
- Click the Run Functional Test Script button on the Rational® Functional Tester toolbar.
- Select the Classics log and then click Finish.
-
Click Yes if prompted to overwrite the log.
Rational® Functional Tester pauses on the Member Logon window because you did not fix that recognition problem yet. At the end of playback, Rational® Functional Tester 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.