< Previous | Next >
Lesson 4: Create a verification point with a datapool reference
In this lesson, you create a verification point with a datapool reference to check that the price for the CD is correct in the ClassicsCD 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 datapool reference instead of a literal value for the value that you are testing in the verification point. Using datapools with verification points gives you more flexibility to test realistic data with your test scripts.
Create a verification point with a datapool reference
- On the Recording toolbar, click Insert Verification Point or Action Command ().
- In the Verification Point and Action Wizard, use the mouse to drag the Object Finder () to $18.99, which is next to "Sub-Total" in the Classics CD application. Functional Tester outlines $18.99 with a red border.
- If the Select an Action page is not displayed, click Next.
- In the Select an Action page, click Perform Data Verification Point to test whether the price of the CD changes.
- Click Next.
- In the Insert Verification Point Data Command page, click Next.
- On the Verification Point Data page toolbar, click Convert Value to Datapool Reference () to use a datapool instead of a literal value in a verification point. (If you cannot see the Convert Value to Datapool Reference button on the toolbar, make the page larger by dragging a corner of the page).
The Datapool Reference Converter dialog box opens.
- In the Datapool Variable field, type Price to replace the newVariable for the heading in the datapool.
- Select the Add value to new record in datapool check box to add the Price to the existing datapool record you created in the previous exercise.
- Click OK.
- Click Finish.
Place the order and close the ClassicsCD application
- In the ClassicsCD application, click Place Order to place the order, and then click OK to close the message confirming your order.
- Click X in the upper right corner of the Classics CD application to close the application.
On the Recording toolbar, click Stop Recording () to write all recorded information to the test script.
The test script is displayed in the editor window.
< Previous | Next >