Lesson 4: Create a verification point with a dataset reference

In this lesson, you will create a verification point with a dataset reference to check that the total amount due for the order is correct in the Classics CD application.

A verification point captures object information and literal values from the application-under-test and stores it as the baseline for comparison during playback. When you play back the script, a verification point captures the object information again to compare it to the baseline and see if any changes have occurred, either intentionally or unintentionally. Comparing the actual object information in a script to the baseline is useful for identifying potential defects.

You will use a dataset reference instead of a literal value for the value that you are testing in the verification point. Using datasets with verification points gives you more flexibility to test realistic data with your test scripts.

Create a verification point with a dataset reference

  1. On the Recording toolbar, click Insert Verification Point or Action Command (Insert Verification Point and Action Commands).

    The Verification Point and Action Wizard opens.

  2. From the Verification Point and Action Wizard, use the mouse to drag the Object Finder (Object Finder) to $19.99, next to Total, in the Classics CD application.

    HCL OneTest UI outlines $19.99 with a red border.

  3. Release the mouse button.
  4. If the Select an Action page is not displayed, click Next.
  5. On the Select an Action page, if necessary, click Perform Data Verification Point to test that the total amount equals the expected amount.
  6. Click Next.

    The Insert Verification Point Data Command page is displayed.

  7. Click Next.
  8. On the Verification Point Data page toolbar, click Convert Value to dataset Reference (Convert Value to dataset Reference) to use a dataset instead of a literal value in a verification point. (If you cannot see the Convert Value to dataset Reference button on the toolbar, make the page larger by dragging a corner of the page)

    The dataset Reference Converter dialog box opens.

    dataset Reference Converter
  9. In the dataset Variable box, type Total to replace the newVariable for the heading in the dataset.
  10. If necessary, select the Add value to new record in dataset check box to add the Total to the existing dataset record you created in the previous exercise.
  11. Click OK.
  12. Click Finish.

Place the order and close the ClassicsCD application

  1. In the ClassicsCD application, click Place Order to place the order, and then click OK to close the message confirming your order.
  2. Click X in the upper right corner of the Classics CD application to close the application.

Stop recording

On the Recording toolbar, click Stop Recording (Stop Recording) to write all recorded information to the test script.

The test script appears in the editor window.

Advance to Lesson 5: Add data to the dataset.