write a VBscript code to parametrize test script using test
data from sqlserver database?
Answer Posted / rajh
dim con,rec
set con=create object("adodb.connection")
set rec=create object("adodb.recordset")
con.open"provider=sqloledb.1;server=name;username=scott;pwd=tiger;database=dbname'
rec.open"sql statement"con
while not rec.eof
window("winmame").winedit("uname").set rs.fields(un)
in the same way use the data
loop
| Is This Answer Correct ? | 6 Yes | 0 No |
Post New Answer View All Answers
Explain the Different types of QTP test assets and their extensions?
i have two questions for regular expression :- Q1. I have date pattern eg-29/11/2011 29-11-2011 29.11.2011 Que- if any separator is there between date,month and year pattern should match else it should not match eg- pattern should not match in case of 2911-2011 Q2. let say i have a string and there is a number in between of that string eg.-Amount 30002.234 successfully credited to your account . now i have to match this pattern in such a way that even if decimal is not there pattern should match ,how i will do this using regular expression
How to attach a file to TD?
Can any one say what exact diff between test->parameters, action properties-> parameters. after defining the parameters in test->settings, how can we access those parameters.(i know how to use action prop parameters)
For which type of projects the iterative model is not suitable?
How to break the object spy ?
what are the frame work models of qtp?which frame work you follow in your company?and explain it process?
What does mean by Scope of Automation?n How we defined it?
What is contained in the object repository?
How do you configure QTP AND Test director?
Hi Friends, I worked with 8.2 not with 9.2. Please help me in this prob. I created one script and recorded some think and save as Test 1 then I opened process--open the object repository manager. Switch to file->save->give some name->save as Objectrepo1.tsr file. (This is the global repository file.) Then I went to object repository->tools-> associate repository ->click + icon ->open the previously saved Objectrepo1.tsr file. This is the global repository Now I created one more script and save as Test 2. In this script I am calling script with the Help of "Call of existing action" and I executed but QTP is not able to execute B’cos it is QTP is not able to read the Object Repository of Test 1. Please let me know why? Once I made Script 1 as a shared Obj. Repository so it would not give any Problem. Right?
How to save your test using quicktest professional (qtp)?
If I give some thousand tests to execute in two days what do you do?
How does quicktest professional identifies the object in the application?
In qtp, how you can remove the spaces from string?