Data driven test

Data driven test
Once the test script is created, you may sometimes want to check how the test script behaves for multiple data. This can be done by creating that many number of test cases and by running each test case individually, which is very difficult. In such cases we use data driven testing. This involves following steps:
  • Create the test case.
  • Parameterize the test case.
  • Provide the required data.
  • Run the test case.
  • Checking tables
Parameterize test:
When you test your applications, you may want to check how it performs the same operations with multiple sets of data. For example you want to check how your web site responds to ten separate sets of data. You could record ten separate tests, each with its own set of data. Alternatively, you can create data table parameters so that your test runs ten times, each using different set of data. It has four parts:
  1. Defining a data table parameter.
  2. Adding parameter values to a data table.
  3. Modifying steps affected by parameterization.
  4. Running and analyzing tests.
Defining a data table parameter:
In this, we will make departure city (of previous section) a parameter so that you can use a different departure city for each test run.
    1. Start Quick Test and open the checkpoint tests.
      If Quick test is not already open, choose START> PROGRAMS> QUICK TEST PROFESSIONAL> QUICK TEST PROFESSIONAL. Then choose, FILE> OPEN or click open button.
    2. Save the test as parameter
      Select FILE> SAVE AS. Save the test as parameter.
    3. Confirm that active screen option is enabled.
      If you don’t see the active screen on the right side of the Quick test window, click the active screen toolbar button, or choose VIEW> ACTIVE SCREEN.
    4. Confirm that data table option is enabled.
      If you don’t see the data table at the bottom of the screen, click the data table toolbar button, or choose VIEW> DATA TABLE.
    5. Select the text to parameterize.
      In the test tree, expand (+) action 1> welcome: mercury> find a flight. Right click “from port” select “New York” and select method arguments. The method arguments box opens.
    6. Set the parameterization properties.
      In this case, the method is select because an item was selected from a list. The argument table displays argument properties.

      • The ABC icon indicates that the argument is constant.
      • Item indicates that the argument is a constant.
      • New York is the value of argument.
      • The edit value area is enabled and displays the constant value New York. In the edit value area, select parameter. This lets you replace the

constant value

      •  (New York) with a parameter.
      • Confirm that he data table option is selected. This means that the value of the parameter will be taken from the quick test data table. The parameter name box is enabled and displays from port_item. Change this departure.
      • Click


      •  to close the dialog box.

Quick Test

    •  adds the departure parameter to the data table as a new column and inserts New York in the first row under it. New York will be the first of the several departure cities that Quick Test will use during test runs of the application.


Scroll to Top