Creating a Basic Test for Conversion - WinRunner

You create a basic test by recording a test, as usual, with one set of data. In the following example, the user wants to check that opening an order and updating the number of tickets in the order is performed correctly for a variety of orders. The test is recorded using one passenger’s flight data.

To record this test, you open an order and use the Insert > GUI Checkpoint > For Single Property command to check that the correct order is open. You change the number of tickets in the order and then update the order. A test script similar to the following is created:

Creating a Basic Test for Conversion
The purpose of this test is to check that the correct order has been opened. Normally you would use the Insert > GUI Checkpoint > For Object/Window command to insert an obj_check_gui statement in your test script. All *_check_gui statements contain references to checklists, however, and because checklists do not contain fixed values, they cannot be parameterized from within a test script while creating a data-driven test. You have two options:

  • As in the example above, you use the Insert > GUI Checkpoint > For Single Property command to create a property check without a checklist. In this case, an edit_check_info statement checks the content of the edit field in which the order number is displayed. For information on checking a single property of an object, see “Checking GUI Objects.”

WinRunner can write an event to the Test Results window whenever these statements fail during a test run. To set this option, select the Fail when single property check fails check box in the Run > Settings category of the General Options dialog box or use the setvar function to set the single_prop_check_fail testing option. For additional information, see “Setting Global Testing Options,” or “Setting Testing Options from a Test Script.”

You can use the Insert > GUI Checkpoint > For Single Property command to create property checks using the following *_check_* functions:

button_check_info scroll_check_info

edit_check_info static_check_info

list_check_info win_check_info

obj_check_info

You can also use the following _check functions to check single properties of objects without creating a checklist. You can create statements with these functions manually or using the Function Generator. For additional information, see “Generating Functions.”

button_check_state list_check_selected

edit_check_selection scroll_check_pos

edit_check_text static_check_text

list_check_item

Alternatively, you can create data-driven GUI and bitmap checkpoints and bitmap synchronization points. For information on creating data-driven GUI and bitmap checkpoints and bitmap synchronization points, see “Using Data-Driven Checkpoints and Bitmap Synchronization Points”


All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

WinRunner Topics