Creating a data verification point

Use a data verification point to test data that is displayed in your application. When you record the verification point, a baseline of the data is created. Then every time you play back the script, the data is compared to see whether any changes have occurred, either intentionally or unintentionally. This is useful for identifying possible defects. You can create a verification point while recording a script or you can insert a verification point anytime in the script.

Before you begin

You can test the following types of data in your application:
  • List data
  • Menu hierarchy
  • The state of a check box or a toggle button in your application
  • Table data
  • Data that is displayed in a DataGrid control
  • Data that is displayed in a DataGridView control
  • Data that is displayed in a ToolStrip control
  • Textual data
  • Tree hierarchy
Tip: When you create a verification point you can use a dataset reference instead of a literal value to supply variable data to make your tests more realistic.
Prerequisites:
  • The test application is started
  • If you are inserting a verification point to an existing script, open the script and place the cursor at the point in the script that you want to insert the verification point.

Procedure

  1. Open the Verification Point and Action wizard.
    • If you are creating a verification point while recording, click the Insert Verification Point or Action Command button Insert Verification Point or Action Command on the Recording Monitor toolbar.
    • If you are inserting a verification point on a script, click the Insert Verification Point into Active Functional Test Script button Insert Verification Point or Action Command on the product toolbar.
  2. On the Select an Object page of the Verification Point and Action wizard, use the Object Finder to select the data that you want to test.
    See the related topic on Object selection and data value options for the data verification point
    Tip: If the After selecting an object advance to next page check box on the Select an Object page is selected, the next page of the wizard is displayed after you select the object. If this check box is cleared, click Next to proceed to the next page.
  3. On the Select an Action page, select the Perform Data Verification Point option and click Next.
  4. On the Insert Verification Point Data Command page, perform these steps:
    1. Click one of the available options in the Data Value field and click Next.
      For information about the data value options and description, see the related topic on Object selection and data value options for the data verification point.
      Notes:
      • The options shown in the Data Value field depends on information provided by the proxy of the object. Values other than those described in the related topic might be listed in the Data Value field.
      • The Visible Table Contents option for DataVP is not available for OLAPDataGrid.
    2. In the Verification Point Name field, accept the default suggestion, or type a new name.
      This name must follow standard Java naming conventions. The default name is based on the name of the object and the data value that you chose to test.
    3. To verify that verification point exists in the application, use the Include Retry Parameters to set a retry time for a verification point during playback. The retry option is useful when playback does not find immediately the verification point in your application. To set a retry time, either use the default, or set a time of your choice. Specify these settings:
      • Maximum Retry Time: The maximum number of seconds that the functional test waits for a verification point to become available for retesting.
      • Retry Interval: The number of seconds between times that the functional test checks for the verification point during the wait period.
      For more information see the related topic about editing the verification point data.
    4. Click Next.
  5. On the Verification Point Data page, edit the data if required.
  6. Optional: To use a dataset reference instead of a literal value for a data verification point:
    1. Right-click a property, and then click Convert Value to dataset Reference. The dataset Reference Converter dialog box opens.
    2. Type a new name for the dataset variable or click the dataset Variable arrow to select the variable for the verification point to reference in the dataset.
    3. Optional: Select the Add value to new record in dataset check box to add the value of the verification point to a new record (row) in the dataset.
    4. Click OK and close the text box.
  7. Click Finish.
    The verification point is added to the script. You can edit the verification point any time by using the Verification Point Editor. See the related topic about verification point editor.
    Notes:
    • You can also create a verification point by manually scripting it. For information, see the Adding manual and dynamic verification points topic. Also see the vpManual() and vpDynamic() methods in the API reference topics. Your script can access the same information as the verification points. See the TestObject getProperty() and getTestData() methods
    • When you create a verification point without using the Recorder in the script, the test object is not inserted in the script. You manually insert the test object for which you are creating a verification point. For example: this script is included when you insert an image verification point without using the Recorder .performTest( Screen_imageVP() );. For the verification point to work, include RootTestObject.getScreenTestObject() in the script. This is the script for the verification point RootTestObject.getScreenTestObject().performTest( Screen_imageVP() );
    .