what is keyword driven framework in qtp.
Answer Posted / deven
Keyword Driven Framework is a type of QTP Framework where
for a particular test case, you would first identify a set
of Keywords and then associate an action (or function)
which each of these keywords.
'Option Explicit
'Include library files
executefile "C:\Test\Library5.qfl"
'add sheets
datatable.AddSheet "dtSheet1"
datatable.AddSheet "dtSheet2"
datatable.AddSheet "dtLogin"
'import test case and test steps sheets from excel to data
table
datatable.ImportSheet "C:\Test\testcase.xls","Sheet1","dtShe
et1"
datatable.ImportSheet "C:\Test\testcase.xls","Sheet2","dtShe
et2"
datatable.ImportSheet "C:\Test\testcase.xls","Login","dtLogi
n"
Dim tcrows,tsrows
'get row count from data table sheets
tcrows=datatable.GetSheet("dtSheet1").GetRowCount
tsrows=datatable.GetSheet("dtSheet2").GetRowCount
For i=1 to tcrows
datatable.GetSheet("dtSheet1").SetCurrentRow(i)
If datatable.Value("Execute","dtSheet1")="Yes" Then
For j=1 to tsrows
datatable.GetSheet("dtSheet2").SetCurrentRow(j)
If datatable.Value("TCID","dtSheet1")=datatable.Value
("TCID","dtSheet2") Then
Select Case datatable.Value("Keyword","dtSheet2")
Case "openapp"
tsresult= openapp()
Case "login"
tsresult= login(datatable.Value
("Agentname",dtLogin),datatable.Value("Password",dtLogin))
End Select
If tsresult="Pass" Then
TestCaseResult=tsresult
End If
'Else
Exit for
End If
datatable.Value("Result","dtSheet2")=tsresult
Next
datatable.Value("Result","dtSheet1")=TestCaseResult
datatable.Value("Result","dtSheet2")=tsresult
End if
Next
datatable.Exportsheet "C:\Test\testcase.xls","dtSheet1"
datatable.exportSheet "C:\Test\testcase.xls","dtSheet2"
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Where to use function or action?
What are the various automation frameworks available in qtp?
Have you done batch testing in qtp? If yes how you are doing?
How many scripts did you have?
How do we handle run-time errors?
Why qtp the best testing tool?
I recorded a Web App with a Oracle backend using QTP 9.5 and for some reason the scripts don't play back> What am I missing at this point. I recorded the same Apps under Sybase and they work great. This is Oracle 10g. Why won't my scripts play back.
What will be happen if i load object repository at run time, but it has already associated.
Could i know how how to explain keyword driven framework in interview? If any body knows plz send the explanation.
What is quick test pro?
How do you compare the structure of 2 tables in database and check whether they are similar using qtp.
1.explain end to end process of qc,2.how many tabs are in qc9.0,qc10.0 3.what is review, how many reviews are following in aproject 4.how will you get the requirements 5.why do we choose testing 6.how to export tc's and requirements to qc through add-ins
Which is the best QTP training institute in Delhi/NCR region and what is the approximate fee for QTP course (Basics and Advanced)
What are the 3 main stages involved in testing with qtp?
What is throw Object?