what is keyword driven framework in qtp.

Answer Posted / bindu

Keyword-driven testing is a Software testing technique that
separates programming work from the actual test steps so
that the test steps can be developed earlier and can often
be maintained with only minor updates, even when the
application or testing needs change significantly.In case of
keyword driven testing, we need to do proper planning and
initial huge effort. Anyway it will give benefit of easy
maintenance and easily adding more test cases/scenarios.

As we see the keyword view in QTP, the keyword driven
testing involves specifying the test steps in below format
Object Action parameter
e.g
Browser(“FireFox”).Page(“QualityPointHome”).webEdit(“username”).Set
“QualityPoint”

Here,

->Browser(“FireFox”).Page(“QualityPointHome”).webEdit(“username”)
is the Object.
->”Set” is the Action.
->”QualityPoint” is the parameter.

Here we can change any of the three things to create test steps.
The Keyword Driven framework consists of the basic
components given below

1. Control File
2. Test Case File
3. Startup Script
4. Driver Script
5. Utility Script

1. Control File

a) Consists details of all the Test scenarios to be automated.
b) User will be able to select a specific scenario to
execute based on
turning on or off a flag in the Control File.
c) Control File is in the form of an excel worksheet and
contains columns
for Scenario ID, Execute (Y/N), Object Repository Path, Test
Case File
Path.

2. Test Case File
a) Contains the detailed steps to be carried out for the
execution of a test
case
b) It is also in the form of an excel sheet and contains
columns for
Keyword, Object Name, Parameter

3. Startup Script
a) The Startup script is utilised for the initialization and
reads the control files.
b) It then calls the driver script to execute all the
scenarios marked for execution in the control file.

4. Driver Script

a) It Reads the Test Case files. Checks the keywords and
calls the appropriate utility script functions based on
specific keyword
b) Error Handling is taken care of in the driver script.

5. Utility Scripts

a) Perform generic tasks that can be used across applications.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is qtp supports uni-code?

610


"What are the common constrains that we need to consider when we prepare testcases for ASP application". Thanks in Advance...

1440


Explain the types of object repository?

553


How can I find out the cursor position through QTP suppose I am keep tabbing(Pressing the tab key continuously) and stoped at a position Now I want to find out where the cursor position is

6300


Can we run test with out adding object in object repository? How it is possible?

540






Explain different type of event trigger option.

537


How do you script a nested loop in QTP? I am showing a snipet of my code. Any suggestions to help me get this to work would be great appreciated! STEP A - Customer Number: No loop - ISBN: Loop STEP B - Customer Number: Loop - ISBN: Nested Loop Here is the code I am using now. I am using i for the loop and j for the nested loop in STEP B of my script. =========================================== 'CREATE AN ADDITIONAL CUSTOMER Dim myNum, RowNum, RowCnt2, val2, total, i DataTable.ImportSheet "C:\QOE Data - UAT1.xls" ,"Data" ,"Global" RowCnt2 = DataTable.GetRowCount i = 1 DataTable.SetCurrentRow(i) ' Set row to one Do while Not i > RowCnt2 i=i+1 DataTable.SetNextRow MsgBox Datatable.Value("Customer_Num") Msgbox i Msgbox RowCnt2 If Not i > RowCnt2 then val2=datatable.Value("Customer_Num","Global") OracleFormWindow("Sales Order").SelectMenu "File->New" OracleFormWindow("Sales Order").OracleTabbedRegion("Order Information").OracleTextField("Customer Number").SetFocus OracleFormWindow("Sales Order").OracleTabbedRegion("Order Information").OracleTextField("Customer Number").Enter val2 End If 'CREATE SECOND ISBN LIST DataTable.ImportSheet "C:\QOE Data - UAT1.xls" ,"Data" ,"Global" Dim j, RowCnt3, val3 RowCnt3 = DataTable.GetRowCount For j = 1 To RowCnt3 DataTable.SetCurrentRow(i) ' datatable.getSheet("DataTable").setNextRow If Trim(DataTable("ISBN",dtGlobalSheet)) = "" Then j = j - 1 Exit For End If Next 'Define ISBN rows If RowCnt3 <> j Then RowCnt3 = j End If 'Loop through ISBN rows For j = 1 To RowCnt3 DataTable.SetCurrentRow(i) val3 = Datatable.Value("ISBN","Global") msgbox j If j = 1 Then OracleFormWindow("Sales Order").OracleTabbedRegion("Line Items").OracleTextField("Ordered Item").SetFocus OracleFormWindow("Sales Order").OracleTabbedRegion("Line Items").OracleTextField("Ordered Item").Enter val3 else If j < 16 Then OracleFormWindow("Sales Order").OracleTabbedRegion("Line Items").OracleTextField("Ordered Item_"&i).SetFocus OracleFormWindow("Sales Order").OracleTabbedRegion("Line Items").OracleTextField("Ordered Item_"&i).Enter val3 else If RowCnt1 => 16 Then OracleFormWindow("Sales Order").OracleTabbedRegion("Line Items").OracleTextField("Ordered Item_15").SetFocus OracleFormWindow("Sales Order").OracleTabbedRegion("Line Items").OracleTextField("Ordered Item_15").InvokeSoftkey "DOWN" OracleFormWindow("Sales Order").OracleTabbedRegion("Line Items").OracleTextField("Ordered Item_15").SetFocus OracleFormWindow("Sales Order").OracleTabbedRegion("Line Items").OracleTextField("Ordered Item_15").Enter val3 end if end if End If Next 'EXIT APP msgbox i loop Browser("Browser").Page("Oracle Applications 11i").Sync Browser("Browser").Close ========================================== It isn't working correctly in my nested loop in STEP B (for ISBN). Any ideas?? Thanks! SBsteve

6735


Presently i am working on QTP 8.2 Version,i want to know features in 9.2 version, because i have not sufficient time to put the effort on the 9.2 version

1406


Explain how you can find the absolute value of the number in qtp?

644


Suggest and Define a solution for an application whose objects are not recognized by UFT?

666


Will there be any standards or requirements for page appearance and/or graphics throughout a site or parts of a site?

602


Define object spy ?

557


i have doubt suppose iam purly working in manual, when i will get work to do on sql and performence testing? pls any one clarify doubt?

1553


How does you pass optional arguments in qtp?

561


I have developed and executed a script successfully, and saved the same to QC. When I tried to execute the script from QC, the script is not executing. What are the possible reasons?”

584