Lesson 3: Create verification points
In this lesson, you will record verification points to
test objects. Verification points verify that a certain action has
taken place, or verify the state of an object.
About this task
Create a data verification point
About this task
Procedure
- In the Recording Monitor, click the Insert Verification
Point or Action Command button (
).
- In the Select an Object page of the Verification Point and Action Wizard, clear the After selecting an object advance to next page option if it is selected.
- Use the Object Finder (
) to select the Composers tree in the application. Click the Object Finder and drag it over the tree. While holding down the mouse button, you will see that the entire tree is outlined with a red border and the object name is displayed (javax.swing.JTree) in a screen tip next to the red border. When you release the mouse button to make the selection, notice that the recognition properties for the object are listed in the grid at the bottom of the Select an Object page.
- Click Next.
- In the Select an Action page, make sure Perform Data Verification Point is selected and click Next.
- In the Insert Verification Point Data Command page, in the Data Value field, select the Tree Hierarchy test. This test captures information about the entire tree hierarchy.
- In the Verification Point Name field, type Classics_tree and click Next.
- The Verification Point Data page displays the captured data in a grid in the right pane. If a check mark appears in the box beside an item, that item will be tested. By default, all items are selected. Leave them checked. If they are not selected, click the Check All button.
- Click Finish.
Create an image verification point
About this task
Procedure
- In the Recording Monitor, click the Insert Verification
Point or Action Command button (
).
- In the Select an Object page of the Verification Point and Action Wizard, clear the After selecting an object advance to next page option if it is selected.
- Use the Object Finder (
) to select the Album image in the application. Click the Object Finder and drag it over the album image. While holding down the mouse button, you will see that the album image outlined with a red border and the object name is displayed (javax.swing.JLabel) in a screen tip next to the red border. When you release the mouse button to make the selection, notice that the recognition properties for the object are listed in the grid at the bottom of the Select an Object page.
- Click Next.
- In the Select an Action page, selectPerform Image Verification Point and click Next.
- In the Insert Image Verification Point Command page, type Album_image as the Verification Point Name.
- Make sure that the option Select full image is selected and click Next.
- The Verification Point Data page displays the captured image in the right pane. Click Finish.
Create a properties verification point
About this task
Procedure
Test the password fields
About this task
Procedure
- Expand the Haydn folder in the composers tree.
- Click Symphonies Nos. 94 & 98.
- Click the Place Order button.
- In the Member Logon window, keep the default settings of Existing Customer and Trent Culpito.
- This time, type xxxx in the Password field.
- Select the Remember Password option.
- Click OK.
- Type a valid card number number and expiration date, for instance, 7777 7777 7777 7777, expiration 06/09.
- Click Place Order.
- Click OK in the order confirmation message box.
- Close the ClassicsCD application by clicking the x button.
- Click the Stop Recording button
(
) on the Recording toolbar.