sample code for keyword driven framework for QTP

11,370 views
Skip to first unread message

arihan sinha

unread,
Jul 2, 2010, 2:04:14 PM7/2/10
to mercu...@googlegroups.com
Dear All,

Can anyone copy+ paste the sample code/screenshot of each section please as it would be very easy to understand while looking to the code rather than theoratical concept.
A) Function Library ( common.vbs, app.vbs)
B) Object Repository
C) Database
D) Application Scenario Files
E) Initialization VBScript
F) Sequence File
G) Driver Script
H) Test Case List File

Regards
Arihan

Ganesh muralidharan

unread,
Jul 2, 2010, 2:41:38 PM7/2/10
to mercu...@googlegroups.com, arihan...@googlemail.com
Attaching a doc shared by our group member.

--
You received this message because you are subscribed to the Google
"QTP - HP Quick Test Professional - Automated Software Testing"
group.
To post to this group, send email to Mercu...@googlegroups.com
To unsubscribe from this group, send email to
MercuryQTP+...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/MercuryQTP?hl=en



--
Regards,


Ganesh Muralidharan

'God Never Forgets'
Keyword driven framework.doc

arihan sinha

unread,
Jul 2, 2010, 4:00:11 PM7/2/10
to Ganesh muralidharan, mercu...@googlegroups.com
Thanks but I already have this and this demonstrates theoratical concept of key word driven framework. but if you have actual code for each section then it would be great.
 
Cheers

Biswajit Agarwal

unread,
Jul 9, 2010, 2:19:57 AM7/9/10
to mercu...@googlegroups.com, Ganesh muralidharan
Hi,

can somebody please share the code of the framework. It will be a gr8 healp.

Thanks
Biswajit

amit rathi

unread,
Jul 9, 2010, 2:43:55 AM7/9/10
to mercu...@googlegroups.com
Hi Biswajit

I am sending you an attachment, it will give you an clear idea about keyword driven framework, from theory to scripting and how to arrange them. if any problem, post here
QTP-Keyword-Driven-Frame-Work edited.doc

Arihan

unread,
Jul 9, 2010, 3:45:42 AM7/9/10
to mercu...@googlegroups.com, mercu...@googlegroups.com
Great thanks from my side amit . This is initiated by me . This doc would really help everyone . 

Regards
Arihan
Sent from my iPhone
<QTP-Keyword-Driven-Frame-Work edited.doc>

LS P

unread,
Jul 9, 2010, 2:28:48 AM7/9/10
to mercu...@googlegroups.com, Ganesh muralidharan
Hi Frieds,
I am also looking  for  the code of the framework.
Thanks,
Srinivas

anuj gupta

unread,
Jul 9, 2010, 8:14:30 AM7/9/10
to mercu...@googlegroups.com
yup thanks everyone.it would really be a great help ..
Anuj Gupta

Swati Meshram

unread,
Jul 10, 2010, 12:05:00 AM7/10/10
to mercu...@googlegroups.com
Hi,
 Good Job! It's helpfull for all the persons.
 
Thanks
Swati

amit rathi

unread,
Jul 10, 2010, 12:10:36 AM7/10/10
to mercu...@googlegroups.com
:)

arihan sinha

unread,
Jul 20, 2010, 6:08:50 AM7/20/10
to rath...@gmail.com, mercu...@googlegroups.com

Dear Amit,

This doc is really helpful.

Just quick question l, if I run the testcase ( say user login) where user goes to homepage , enters userid /psw and click login button and then logout.
But if i want to run this for say 3 iterations with three diff userid/psw then how you would fit this to the framework you have sent in the attached doc.

Cheers
A

S R I D H A R

unread,
Jul 20, 2010, 10:43:47 AM7/20/10
to mercu...@googlegroups.com
The frame work is exclusively designed for to run like these situations(Executing same script with multiple set of data).
So the script will preform the expected functionality with out any issue.

Thanks
దివ్యశ్రిధర్ ,திவ்யஸ்ரிதர்,ദിവ്യസ്രിധര്‍

VENKAT musku

unread,
Jul 20, 2010, 11:09:34 AM7/20/10
to mercu...@googlegroups.com
can some one expand the excel sheets fully in the document, so we can see the entire data in the document.
i want to use this for the login screen of the sample flight app.
 
any help is appreciated?
 
- ven

Thanks,Venkat Musku

Arihan

unread,
Jul 20, 2010, 11:14:06 AM7/20/10
to mercu...@googlegroups.com
Have you checked line by line  the document , driver script and test case file. Pls check once .  


Regards
Arihan
Sent from my iPhone

amit rathi

unread,
Aug 22, 2010, 2:14:40 AM8/22/10
to mercu...@googlegroups.com
Hi Guys, I am attaching a data driven and keyword driven framework file from HELSINKI UNIVERSITY OF TECHNOLOGY, Department of Computer Science and Engineering,
Software Business and Engineering Institute by Pekka Laukkanen, great document.
Hope will help you all to understand the concept of framework.


Thanks
Amit Rathi

amit rathi

unread,
Aug 22, 2010, 2:15:31 AM8/22/10
to mercu...@googlegroups.com
Data-Driven and Keyword-Driven Test.pdf

Kiran Ogeti

unread,
Aug 22, 2010, 7:13:48 PM8/22/10
to mercu...@googlegroups.com
I need to search for a particular value in excel spreadsheet and find out the respected row.. could you help please

lets say I have more than 100 rows in excel , I need to find a value "xxxxx" , once found the value then retrieve the row number..

Thanks for your help

Nandeesh Kumar

unread,
Aug 24, 2010, 1:38:53 AM8/24/10
to mercu...@googlegroups.com
Hi kiran,
 
   Use the below code, and see the explanation below,
 
Set xlapp=createobject("Excel.application")
Set wbook=xlapp.Workbooks.Open("C:\Results\Test.xlsx")
Set wsheet=xlapp.worksheets(1)
rw=wsheet.usedrange.rows.count
expt="xxxx"
For i=1 to rw
 src=wsheet.cells(i,1).value
 If expt=src then
  msgbox i
  end if
  next
wbook.Close
Set wsheet=nothing
Set wbook=nothing
Set xlapp=nothing

1. create excel object
2. get total number of rows (rw)
3. assign expected value to variable (expt)
4. use for loop to find the value
5. in for loop assign cell value to variable by increasing row number
6. compare the expected and actual value
7. get row number
 
Hope it helps you.
 
Nandeesh

venkata koduri

unread,
Aug 29, 2010, 2:01:46 AM8/29/10
to mercu...@googlegroups.com
Thank you Very much Mr Biswajit



On Fri, Jul 9, 2010 at 12:13 PM, amit rathi <rath...@gmail.com> wrote:



--
Regards..
Venkat

Balu

unread,
Jan 31, 2014, 6:41:38 AM1/31/14
to mercu...@googlegroups.com
Hi Biswajit,

Thank you for such wonderfull document,
It would be of great help -
In the above document, could you please repost it with the code for "Startup Script" ?

Do you have any updated framework code ?


thank you so much

Ayaz Ahmed

unread,
Feb 5, 2014, 7:01:18 PM2/5/14
to mercu...@googlegroups.com
Use the Excel built in find function to jump to the first occurrence of search string then retrieve the row id rather then looping around 1000 rows.
thats what i do i have 2400 test cases in excel and comparing each row with my string to match would take lot of time...
just a a suggestion.

Karthi Nagarajan

unread,
Nov 30, 2014, 2:32:17 PM11/30/14
to mercu...@googlegroups.com
Please Share us the keyword driven framework sample folder structure with coding. It will be help for us to easily understand the keyword driven framework by debugging the code. Thanks in advance.



Regards,
Karthi





On Friday, July 9, 2010 12:13:55 PM UTC+5:30, Amit Rathi wrote:

krishna kanth

unread,
May 22, 2015, 9:47:27 AM5/22/15
to mercu...@googlegroups.com
Dear All ,

i like to have small help from you people. 
scenario: i have a data sheet where i write my test cases in different excel sheets like sheet 1, sheet 2 , sheet 3 in a single excel workbook. so each sheet has one test case . I am executing the script using Keyword driven framework.

so my question is that how can i execute all the test cases in different excel sheets in a single workbook.how to write the bv script for making all the sheets test cases to run. paste your script here . 

Sai Katteboina

unread,
Jan 18, 2017, 11:38:20 PM1/18/17
to QTP - HP Quick Test Professional - Automated Software Testing
Hi,

Thanks for sharing the Keywork driven framework. I've gone thru it. It looks good. Good work first of all!

Can you please share the code for Startup script. Thanks!
Reply all
Reply to author
Forward
0 new messages