Guidelines for Creating a Data-Driven Test - WinRunner

Consider the following guidelines when creating a data-driven test:

  • A data-driven test can contain more than one parameterized loop.
  • You can open and save data tables other than the default.xls data table. This enables you to use several different data tables in one test script. You can use the New, Open, Save, and Save As commands in the data table to open and save data tables. For additional information, see “Editing the Data Table”
  • Before you run a data-driven test, you should look through it to see if there are any elements that may cause a conflict in a data-driven test. The DataDriver and Parameterization wizards find all fixed values in selected checkpoints and recorded statements, but they do not check for things such as object labels that also may vary based on external input. There are two ways to solve most of these conflicts:
  • Use a regular expression to enable WinRunner to recognize objects based on a portion of its physical description.
  • Use the GUI Map Configuration dialog box to change the physical properties that WinRunner uses to recognize the problematic object.
  • You can change the active row during the test run by using TSL statements.
  • You can read from a non-active row during the test run by using TSL statements. For more information, see “Using TSL Functions with Data-Driven Tests”
  • You can add tl_step or other reporting statements within the parameterized loop of your test so that you can see the result of the data used in each iteration.
  • It is not necessary to use all the data in a data table when running a datadriven test.
  • If you want, you can parameterize only part of your test script or a loop within it.
  • If WinRunner cannot find a GUI object that has been parameterized while running a test, make sure that the parameterized argument is not surrounded by quotes in the test script.
  • You can parameterize statements containing GUI checkpoints, bitmap checkpoints, and bitmap synchronization points. For more information, see “Using Data-Driven Checkpoints and Bitmap Synchronization Points”
  • You can parameterize constants as you would any other string or value.
  • You can use the data table in the same way as an Excel spreadsheet, including inserting formulas into cells.
  • It is not necessary for the data table viewer to be open when you run a test.
  • You can use the ddt_set_val and ddt_set_val_by_row functions to insert data into the data table during a test run. Then use the ddt_save function to save your changes to the data table.



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

WinRunner Topics