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 must have completed the following tasks:
  • Start the application which you want to test.
  • When you want to insert a verification point to an existing script, open the script and place the cursor at that point in the script where you want to insert the verification point.

About this task

You can either create a data verification point when you record a script or insert a data verification point after you record a script. The data verification point captures the data displayed for the selected objects. For the objects that contain a script tag, the data verification point also captures the JavaScript code. If you want to record or run the test without capturing the JavaScript code, you can add the flag ft.html.text.skipscripttag and set it to true in ivory.properties file, which is located in the folder <install_directory>\Functional Tester\bin\.
You can test the following types of data in your application:
  • List data
  • Menu hierarchy
  • The state of a checkbox 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.

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.
    For more information, See Selecting objects and data value options for data verification points.
    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 Selecting objects and data value options for data verification points.
      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 Editing 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 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. For more information, See 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() );
    .