Verification points are used to verify whether the expected behavior occurred during a playback of the test script or verify the state of a control or an object. When you create a verification point, you are capturing information about a control or an object in the application to establish this as baseline information for comparison during playback.
During script playback, the property is compared to see whether any changes have occurred in the application, either intentionally or unintentionally. This is useful for identifying possible defects when an application has been upgraded for example. An error is reported if the expected behavior did not occur.
Verification points can be created for any of the object properties while recording a script or you can insert a verification point anytime in the script
Here are the steps to create a verification point
1. In Rational Test Workbench capture android mobile test script and open the test script and in the Test Contents area as shown in pic 1 below:
2. Click an action item for which you want to create a verification point. Refer to pic 2 below:
Note: Edit Text has been selected as an object in below example.
3. Click the insert button and select Verification point for Android or Web UI, depending on the target application. Refer pic 2.
4. Alternatively right-click the selection or click Options and insert in the test editor to select the menu item as shown in Pic 3.
5. Apart from the above methods, Verification point can also be created from the screen captures or elements from the Mobile Data section. Refer to pic 4 and pic 5 below:
6. In the Test Element Details section select a value for the Graphic object (Edit Text) and Verify attribute (Text) artifacts identified as required for the action selected. Refer to pic 6 and 7 below:
7. Some artifacts are dependent on others, so when you select an attribute, you must select the values required for the options related to the selected attribute. To combine several attributes for the selected object, select the choice all of and select the object’s attribute.
8. In below pic verification point is created on Text and Is enabled attributes. Refer to Pic 8 below:
9. Optionally select the Retry verification point until attribute is verified or time out expires and enter a value for the time out. The values in the graphic object and attributes lists are different for web UI apps and Android apps.
10. Save the test script and initiate the play back
Case 1: Play back succeeds if the verification point conditions are met. If VP passes you would see the verification result in green color as mentioned in the below image.
Case 2: Play back fails if the verification point conditions are not met and Fails. If VP fails you would see the verification result in red color as mentioned in the below image