Solved

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

Posted on 2008-09-30
6
681 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
Comment Utility
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
Comment Utility
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
Comment Utility
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 to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 
LVL 9

Accepted Solution

by:
Suveer Patil earned 500 total points
Comment Utility
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
Comment Utility
Excellent Suveer.  Does that work agcps?
0
 
LVL 9

Expert Comment

by:Suveer Patil
Comment Utility
Data Driven Testing in QTP
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

If you are using Scrum Framework or another agile process, a retrospective may be part of it. Does your team perform retrospectives? Are you getting value from your retrospectives? I see a common anti-pattern when people conduct a retrospective f…
Introduction I've been in the software industry for over 20 years. I've interviewed at lots of companies, from start ups in stealth mode to some of the biggest and most successful. I've also conducted lots of interviews, especially as I've become a…
This video discusses moving either the default database or any database to a new volume.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

772 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now