< Previous | Next >

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

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 Projects view.

Procedure

  1. 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 HCL OneTest™ UI Verification Point Comparator displays your verification point data. Notice that the Comparator banner includes the name of your verification point.

    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 HCL OneTest™ 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 object javax.swing.JLabel is different, the image verification point failed. So you must update the baseline file to change the object to match ClassicsB.

  2. Click the Load Baseline to Edit button (Edit Baseline) on the Comparator toolbar.
  3. Click the Replace Baseline with actual value button (Replace Baseline) on the Comparator toolbar. The actual image is loaded as the baseline image.
  4. Close the Comparator.
  5. 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)."
  6. 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.

  7. Click the Load Baseline to Edit button (Edit Baseline) on the Comparator toolbar. Notice that the left Value column displays the Baseline Value now.
  8. Instead of scrolling to the text property, you can click the Jump to First Difference button (Jump to First Difference) 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.

  9. This test has only one difference to update, so click the Replace Baseline with actual value button (Replace Baseline) 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 HCL OneTest™ UI Help.
  10. 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.

  11. Close the log.
  12. Click the Run Functional Test Script button on the HCL OneTest™ UI toolbar.
  13. Select the Classics log and then click Finish.
  14. Click Yes if prompted to overwrite the log.

    HCL OneTest™ UI pauses on the Member Logon window because you did not fix that recognition problem yet. At the end of playback, HCL OneTest™ 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.

  15. Leave the log open.
< Previous | Next >
Feedback