• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 707
  • Last Modified:

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

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
agcps
Asked:
agcps
  • 3
  • 2
1 Solution
 
Bryan ButlerCommented:
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
 
agcpsAuthor Commented:
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
 
Bryan ButlerCommented:
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
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
Suveer PatilQA AnalystCommented:
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
 
Bryan ButlerCommented:
Excellent Suveer.  Does that work agcps?
0
 
Suveer PatilQA AnalystCommented:
Data Driven Testing in QTP
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now