Solved

what is the procedure to create scripts using Data Driven Testing in QTP?

Posted on 2008-09-30
6
693 Views
Last Modified: 2012-06-27
The only thing i know about the Data Driven Frame work in QTP is as follows:
In data driven framework, we will take input from one input excel file, and process the input in the script and send the result to the same excel file. In this framework, we can take the data through excel
file, .csv file, ADO, DAO(Data Access Objects).....ADO means ActiveX Data Objects. This is the current and latest method of retrieving the information from the databases.

Can anyone please guide me or provide some detailed descripton material where i can learn to create scripts using Data Driven Framework.
0
Comment
Question by:agcps
  • 3
  • 2
6 Comments
 
LVL 16

Expert Comment

by:Bryan Butler
ID: 22614152
I'm not sure how general or specific to be here.  If you are 1-new to programming, or 2-just new to rec/play/script testing, or if 3-you are just new to this tool as you mention.  I'll assume 3, and to what degree, I'll go with you know some things about programming and also how rec/play/script testing is done in general.  So, to start with, you will benefit greatly to use the rec play part initially to start scripting.  Here you would record some "test" actions and then use the syntax in the scripts to write the real scripts.  Initally playing around with variable substitution using spreadsheet will be the best way to learn. Also in the beginning you will be getting used to the various "objects" and naming conventions and controls sturctures (loops, data types, arrays, etc).  Then you start learning the shortcuts and workarounds to handle all the buttons/input/operations that your program does; you will be lucky if QTP is able to recognize every one of the actions your tests need to do.  Also, you will start to see patterns in the procedures and algorythms you use for simple tests, which is where I would start - doing simple tests.  That gives you the time to learn how to use the tool best for your app, and see more patterns and be better able to design the tests.  Then you can start to design the framework using all the current tricks, tips and tools you have.  I suggest the 2 level spreadsheet framework.  I forget the details for this, but I can find them if you'd like.  Basically you use one "parent" for the tests and results, and then individual "children" for test scripts.  I know this isn't about using spreadsheets, but I'm hoping it's what you were looking for, or at least helps a bit.  Cheers.
0
 

Author Comment

by:agcps
ID: 22648257
I have worked with QTP for an Year.
I have automated Smoke Test.
I know how to use Object repository, Global - Local Data sheets, Doing VB scripting to some extent.

I want to learn how this Data Driven testing is done in QTP.




0
 
LVL 16

Expert Comment

by:Bryan Butler
ID: 22672886
I cant' give you the details right now as it's been a while since I used it.  I just remember you have variable names for the spreadsheet values that you use in the scripts, and also associate the test scripts with the spreadsheet.  I'll see if I can dig up some of my old work and get specific.
0
How Do You Stack Up Against Your Peers?

With today’s modern enterprise so dependent on digital infrastructures, the impact of major incidents has increased dramatically. Grab the report now to gain insight into how your organization ranks against your peers and learn best-in-class strategies to resolve incidents.

 
LVL 9

Accepted Solution

by:
Suveer Patil earned 500 total points
ID: 22936172
In QTP Data Driven wizard is available in

Tool->Data Driven Wizard


When no script is recorded "Data driven wizard " is disable. Purpose of Data Driven testing is parameterize our test so we can
repetitively perform our test.

We can parameterize our test in both views (i) Keyword (ii) expert

In keyword view only
(I)
Select the field you want paqrameterize,
(II) Right click on it ,select parameter in place of "constant"
(III)
Select data-table and then global test sheet
(IV) Give column name in "Data Table" by pressing "modify"

That will create column into
your data-table and as many valid value you will give it will perform test.


From expert view -

(I) Select Tool->Data Driver wizard
(II) In this all the fields will be shown to you
(III) Select "parameterize" button
(IV) Select "step -by-step" and press next
(V) It will show all the field select the field you want to parameterize and create column in "Data Table"
(VI) Select data-table and then global test sheet
(VII) Give column name in "Data Table" by pressing "modify"


It will create data driven test

Cheers,
Suveer
0
 
LVL 16

Expert Comment

by:Bryan Butler
ID: 23207826
Excellent Suveer.  Does that work agcps?
0
 
LVL 9

Expert Comment

by:Suveer Patil
ID: 24793171
Data Driven Testing in QTP
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The Quality Assurance engineer of an Agile scrum team must "own" the acceptance criteria for sprint tasks.
By this time the large percentage of day-to-day transactions have shifted to mobile banking; here are some overriding areas QAs must investigate while testing mobile banking apps.  
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

713 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question