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. |
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...
|
|||||||
|
|||
|
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 |
| Sponsored Links |
|
|||
|
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 |
|
|||
|
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- |
|
|||
|
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 |
|
|||
|
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 It takes to data table you can add any number of users you want. |
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
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 |