What are the general steps involved in the data driven framework?

Answer

The general steps involved in the data driven framework are:

  1. Prepare the Test Case for the Application Under Test
  2. Add the Objects from AUT to OR
  3. Write the scripts based on the Test Case

In this tutorial, we will develop a data driven framework for a sample test case by using Excel as an external source for the Test data.

Step1) Prepare the Test Case for the Application under Test

Test Case: Open the order number and get the customer name for that order. Repeat the same process for different Order numbers

External Source: Excel File

 

The External source for this sample is an Excel file. The VB script in QTP must be written to open an Excel file in order to read the test data. This can be achieved in a hierarchical manner.

1. An excel file is first opened an as Application

2. Then the workbook must be opened from the specified location

3. The sheet where the test data are present.

4. Finally the cell must be read.

Step 2)  Add the Objects from AUT to OR

Once the Test case is ready, start adding all the required objects to the repository. In our test case, the objects need to be added are as follows

  • “Open Folder” icon in the Flight Reservation application

“Order No” Checkbox which can be obtained when the “Open Folder” icon is clicked

 

The WinEdit box of the Order no (where the numbers are entered)

The OK button

The “Name” field which is a WinEdit box. This field will be populated with a name once the OK button is clicked for a particular Order number.

 

Step 3)  Write the scripts based on the Test Case

Before running the script, ensure that the excel file containing the test data has been saved and is closed.

Below script is to read the order number from the excel and assign it into the application through variable “vOrder” and write the customer name from the application through variable “vName”.

Excel Name: FlightDDF.xlsx

Sheet Name: Sheet1

The Data Driven Framework can also be developed by writing descriptive programming.

 

 

All qtp Questions

Ask your interview questions on qtp

Write Your comment or Questions if you want the answers on qtp from qtp Experts
Name* :
Email Id* :
Mob no* :
Question
Or
Comment* :
 





Disclimer: PCDS.CO.IN not responsible for any content, information, data or any feature of website. If you are using this website then its your own responsibility to understand the content of the website

--------- Tutorials ---