Data Table Parameters in QTP in Testing

Data Table parameters are used to create a data-driven test or action that runs many times using the data you supply. In each repetition, Quick Test uses a different value from the Data Table.

For example consider the Mercury Tours sample web site which enables you to book flight requests.

Merucry-tours-qtp.jpg

To book a flight, you supply the flight information and click on the Continue button. The site shows the available flights for the requested booking.

Flight-booking-qtp.jpg

First you should record your actions that access the mtours web site and check for the available flights.


Value-Confirguration-dialogbox-qtp.jpg

Then you parameterize the selected booking location using a Data Table parameter and you can add your own sets of data to the data sheet of the Data Table.


Value-Confirguration-dialogbox-Parameter-qtp.jpg

A new column is added into the Data Table in QTP when you create a new Data Table parameter and in the first row the current value is placed after the parameter. If you parameterize a value in QTP and select a current Data Table parameter then the value present in the column after the parametrized value is not overwritten by the current value of the parameter in the tool.

Column-departure-arrival-qtp.jpg

Every column in the data table represents the list of values for a single data table parameter after parametrization of the values in QTP.

Row-Column-Parameter-QTP.jpg

Every row in the table shows a set of values that QTP adds for all the parameters during a single run of the test. When you run your test, Quick Test runs one iteration of the test for each row of data in the table.