Geeks Talk

Prepare for your Next Interview


Welcome to the Geeks Talk forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.

Data -driven testing in qtp

This is a discussion on Data -driven testing in qtp within the QTP forums, part of the Software Testing category; hi.. kindly let me know how to use data driven testing in qtp using vbscript i would be glad if provided with example. regards gouthami...

Go Back   Geeks Talk > Software Testing > QTP
Register Blogs FAQ Tag Cloud Calendar Mark Forums Read
  #1 (permalink)  
Old 06-18-2007
Junior Member
 
Join Date: Jun 2007
Location: bangalore
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
gouthami123 is on a distinguished road
Data -driven testing in qtp

hi..

kindly let me know how to use data driven testing in qtp using vbscript
i would be glad if provided with example.


regards
gouthami
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 06-18-2007
Junior Member
 
Join Date: May 2007
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
nexus1315 is on a distinguished road
Re: Data -driven testing in qtp

Data Driven testing is nothing but passing parameters repeatedly and executing the same script with different values
like if you see the below script,
Dim url
url = DataTable.Value ("url",dtLocalSheet)
Create a column in the localsheet of QTP test script and from there passing values to the script
Reply With Quote
  #3 (permalink)  
Old 06-18-2007
Expert Member
 
Join Date: Nov 2006
Location: Hyd-IND
Posts: 528
Thanks: 1
Thanked 63 Times in 50 Posts
sutnarcha is on a distinguished road
Re: Data -driven testing in qtp

This one was recorded and enhanced when I was learning QTP. I am still learning .

With Window("Flight Reservation")
.Activate
.WinMenu("Menu").Select "File;Open Order..."
With .Dialog("Open Order")
.WinCheckBox("Order No.").Set "ON"
.WinEdit("Edit").Set DataTable("A", dtGlobalSheet)
.WinButton("OK").Click
End With
.WinButton("Update Order").Check CheckPoint("Update Order")
.WinRadioButton("First").Set
.WinButton("Update Order").Check CheckPoint("Update Order_2")
.WinButton("Update Order").Click
End With
__________________
Lack of WILL POWER has caused more failure than
lack of INTELLIGENCE or ABILITY.

-sutnarcha-
Reply With Quote
  #4 (permalink)  
Old 06-18-2007
Junior Member
 
Join Date: Jun 2007
Location: bangalore
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
gouthami123 is on a distinguished road
Re: Data -driven testing in qtp

well now,i wanted to know abt environment variables.
Reply With Quote
  #5 (permalink)  
Old 07-15-2009
Junior Member
 
Join Date: Nov 2008
Location: hyderabad
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
sankam is on a distinguished road
Re: Data -driven testing in qtp

Hope this will help u for Data Driven Testing in QTP by passing different values thru external data files such as excel.
SystemUtil.Run "C:\Program Files\Internet Explorer\IEXPLORE.EXE","","C:\Documents and Settings\Jimohan","open"
Datatable.Import("D:\TestData.xls")
Datatable.AddSheet(1)
row_cnt=datatable.getrowcount
Msgbox row_cnt
For i=1 to row_cnt
Uid=Datatable.Value("Uid",1)
msgbox Uid
Password=Datatable.Value("Password",1)
msgbox Password
Browser("Browser").Page("Yahoo! India").Link("Mail").Click
Browser("Browser").Page("Sign in to Yahoo! India").WebEdit("login").Set DataTable("Uid")
Browser("Browser").Page("Sign in to Yahoo! India").WebEdit("passwd").SetSecure DataTable("Password")
Browser("Browser").Page("Sign in to Yahoo! India").WebButton("Sign In").Click
Browser("Browser").Page("Yahoo! Mail (santhu_2k4)").WebElement("Sign Out").Click
Browser("Browser").Page("Page").Sync
Browser("Browser").Close

Next
datatable.setnextrow
Reply With Quote
  #6 (permalink)  
Old 07-15-2009
Junior Member
 
Join Date: Jul 2009
Location: va
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
sri1915 is on a distinguished road
Re: Data -driven testing in qtp

Data driven testing :we will separate the test data from the test case such that data can be changed with out making any effect to the testcase.
So for that we use parameter.
ex:you want to check your application with differernt users.click on username u can see this sign.give parameter click ok.
It takes to data table you can add any number of users you want.
Reply With Quote
Reply

  Geeks Talk > Software Testing > QTP

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads

Thread Thread Starter Forum Replies Last Post
Regarding QTP keyword driven framework vjlaxmi QTP 10 05-19-2009 11:51 PM
what is Data-driven, Time-Driven and keyword-driven testing vijenjoy2k2 Testing Issues 1 05-31-2007 06:22 AM
Data-driven, Time-Driven and keyword-driven testing? spd15 Testing Issues 1 04-02-2007 03:24 AM
data streams in xml testing sharmilak Web Testing 0 03-08-2007 01:36 AM


All times are GMT -4. The time now is 05:12 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.3.1
Copyright © 2009 GeekInterview.com. All Rights Reserved