Solved

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

Posted on 2008-09-30
6
685 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

I worked at a US software company that used offshore contractors for ten years and offshore employees for three years. We had a positive experience and you can too.   When I interviewed people for positions in the US, I would tell them that we wor…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
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…

863 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

21 Experts available now in Live!

Get 1:1 Help Now