Showing posts with label HP QTP. Show all posts
Showing posts with label HP QTP. Show all posts

Friday, March 01, 2013

QTP Certification Information ((HP0-M47) Details





QTP 11 Version was introduced in the month of September 2010 and in July 2011, QTP 11 Certification (Code: HPO-M47) have been introduced in the place of QTP 10 certification. QTP 10 Certification has become obsolete.

This exam is conducted by HP in collaboration with the Pearson VUE. Before, it was taken care by prometric centers but now it is handled by Pearson VUE from Feb 1st, 2012.
 Changes in QTP 11 Certification:
Candidates need to take both Quality Center and the QTP exams to get certified in AIS (Accredited Integration Specialist) certificate. But, QTP 11 certification itself is enough to get certified in QTP 11 certification (HP-AIS – Functional testing – HPO-M47).

QTP Certification: Examination Details:
Following are the details about the model of Question Paper:
There will be totally 72 questions with different types of questions:
         Single Choice Selection
         Multiple Choice Selection
         Drag and Drop
         Point and Click
         True or False
Examination time is for 105 minutes and need to score minimum of 75% to get certified.

Registration Process

         Candidates should visit the HP site and get the learners ID.
         Using that learners ID, Candidate have to create a user profile in the Pearson VUE site.
         Exam fees of Rs.2600 have to be provided through debit or credit card.
         Acknowledgement mail will be received along with  the examination date and the registration number for the exam.

QTP 11 Certification Syllabuses:

Following points talks about the topics covered for this certification – Link to HP sitefor more details:
    Automated test planning ---10%
         Plan for general testing and automation.
         Plan for QTP testing.
         Identify and describe features and settings.
         Explain QTP licensing and packaging.
     Basic test creation and how QTP works with objects --19%
         Create the basic test.
         Explain how QTP works with objects.
         Add steps without recording.
         Explain the purpose and operation of Smart Identification feature
     Basic test verification and enhancement—24%
         Add standard and custom verification points.
         Enhance tests with parameters.
         Add custom checkpoints.
         Add database checkpoints.
         Add bitmap checkpoints.
         View test results.
     Modular automated test builds—11%
         Explain how to build modular QTP tests with Actions.
         Use a Shared Object Repository.
     QTP and ALM integration---7%
         Explain the QTP/ALM connection.
         Define ALM management of QTP resources.
         Explain versioning features in QTP
     Automated test troubleshooting---10%
         Troubleshoot Object Recognition problems.
         Use Recovery scenarios.
         Use the Debugging Tool.
         Measure System Performance.
         Configure log tracking
     Advanced QTP Scripting—4%
         Import and export Excel sheets.
         Get and set object properties.
         Identify descriptive programming to bypass repository.
    Expert View—7%
         Describe Expert View features.
         Describe dynamic object programming.
         Identify and describe VBScript elements.
     Web applications---8%
         Recognize Web Add-in Extensibility.
         Describe Web event recording use and configuration.
         Identify new web testing capabilities.


Saturday, December 24, 2011

HP Quicktest Professional 10.00 - New Capability: Quality Center 10.00 integration

Qtp To Qality center using run the script


AdvancedQTP site


Great site containing unique and interesting information about QTP.
Authors publish periodically articles about non-documented QTP features, investigations, books, etc.Site contains internal forum.




http://www.advancedqtp.com/

This QTP video shows and explains how to create and work with QTP Recovery Scenarios.

For example, during an execution of QTP test, it can be interrupted by different windows, pop-ups, message boxes, etc. The problem is that they can appear at any time and you cannot predict this event.
I've shown how to create QTP Recovery Scenario for the following message box:









This QTP video shows and explains concepts of QTP Descriptive Programming






  1. What is QTP Descriptive Programming?
  2. How to pass properties and their values directly to test object?
  3. How to pass properties and their values using Description object?
  4. How to select Descriptive Programming properties of a test object?
  5. How t0 convert usual QTP script into QTP Descriptive Programming script?
  6. How to debug QTP DP?
  7. Different secrets of QTP Descriptive Programming

QTP RegExp VIDEO - How to click dynamic link?

For example, the number of email drafts can vary:

  1. Quick Test Professional cannot know in advance which text will be present. 
  2. So, how QTP can click such dynamic links? 
  3. There are several possible solutions: 
  4. We can use QTP Regular Expression to match dynamic link. 
  5. We can use QTP DP (Descriptive Programming) in to find the link during run-time. 
  6. We can use others properties of the dynamic link to identify it 
  7. The present QTP video shows first approach. 
  8. The tutorial covers the following: 
  9. working with QTP Object Repository 
  10. identification properties of QTP objects 
  11. QTP RegExp in object's properties 
  12. how QTP identifies objects in application 


and others...

QTP DataTable -Video


  1. How to create QTP Data Table parameter using QTP Data Driver 
  2. How to create QTP Data Table parameter manually 
  3. How to read/write values from/to QTP Data Table 
  4. QTP script and Data Table execution settings 
  5. Global and local (action) sheets of Data Table 
  6. Quick Test Professional data-driven tests

How to capture dynamic text-Video

  1. How to use QTP to capture text from the page 
  2. Settings from QTP 'Output Text Value Properties' dialog 
  3. Explanation for QTP Output value 
  4. Explanation for left & right boundaries 
  5. How to save QTP Output text value into QTP Data Table 
  6. Differences between Global and Local QTP Data Table sheets 
  7. How to read value from QTP Data Table 

How to record QTP script - video tutorial - Part 2

How to record QTP script - video tutorial - Part 1


  1. How to record QTP script for Web applications 
  2. What record and run settings should be used to run and execute QTP script 
  3. How to replay/execute QTP script 
  4. How to get results of executed QTP script 
  5. How to enable capturing screenshot during QTP scipt replaying 
  6. How to enable capturing video during QTP script replaying 



Qtp 9.2 basics

Qtp 9.2 Tutorial
View more presentations from ahamadqtpblogspot

QTP Basics

Tuesday, December 13, 2011

‘Parameterization in QTP using DataTable

Data driven means that we run same QTP script using different data.
For example you can create Login script and then use data driven methods to run that script multiple times with multiple sets of userid and passwords.
Using QTP data tables
Using Excel sheets
Using Access database
You can use ADODB object to get data from Excel and Access and put that data in Arrays or Dictionary object and then can use that data in different scripts.
Parameterization in QTP using Data Table :
Invoke Application "C:\Program Files\HP\QuickTest Professional\samples\flight\app\flight4a.exe"
Dialog("Login").WinEdit("Agent Name:").Set Data Table.Value("A","Global")
Dialog("Login").WinEdit("Password:").Set Data Table.Value("B","Global")
Dialog("Login").WinButton("OK").Click
Window("Flight Reservation").Close
Example :
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\ahamad","open"
Datatable.Import("D:\data.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("gmail.email").Link("Mail").Click
Browser("Browser").Page("gmail.email").WebEdit("login").Set DataTable("Uid")
Browser("Browser").Page("gmail.email").WebEdit("passwd").SetSecure DataTable("Password")
Browser("Browser").Page("gmail.email").WebButton("Sign In").Click
Browser("Browser").Page("gmail.email (ahamadqtp)").WebElement("Sign Out").Click
Browser("Browser").Page("Page").Sync
Browser("Browser").Close
Next
datatable.setnextrow

Saturday, December 10, 2011

Fifth Generation Scriptless and Advanced Test Automation Technologies



By Jeff Hinz, CTO, TESTars Test Competence Centre.with Martin Gijsen, Principal Test Automation Architect, DeAnalist.nlReviewed for accuracy by Christopher J. Scharer, Director VIVIT Worldwide and Maurice Siteur, Managing Consultant, in Testing, Capgemin
Explaining fourth generation test automation Jeff wrote a whitepaper to get clients knowledgeable in basic test automation principles. For those needingan introduction to the basics of test automation please refer to the white paper Jeff wrote addressing the subject, Test Automation Awarenessi. To understand advanced test automation, it is important to understand the progression/evolution of test automation approaches


1st Generation – Record and Playback
                                      

2nd Generation – Use/reuse of functions in test scripts


3rd Generation – Data Driven scripts/functions


4th Generation – Action word (keyword) scripts/func.



5th Generation – Scriptless Automation







Friday, December 09, 2011

Recovery Scenarios -QTP


Recovery Scenarios
What is a recovery scenario:
Recovery scenario - a definition of an unexpected event or error or application crash and the operation(s) necessary to recover the run session
A recovery scenario consists of the following
Trigger Event—The event that interrupts your run session.
Recovery Operation(s)—The operation(s) that need to be performed in order to continue running the test or component
Post-Recovery Test Run Option—The instructions on how Quick Test should proceed once the recovery operations have been performed, and from which point in the test or component Quick Test should continue, if at all.
Recommendations for using Recovery Scenarios
If you can predict that a certain event may happen at a specific point in your component, it is highly recommended to handle that event directly within your component by adding steps such as If statements or “Optional Steps” in user-defined functions, rather than depending on a recovery scenario.
You should use recovery scenarios only for unpredictable events, or events that you cannot synchronize with a specific step in your component.
Handling an event directly within your component enables you to handle errors more specifically than recovery scenarios. It also enables you to control the timing of the corrective operation with minimal resource usage and maximum performance.
Different Recovery Operations:
Keyboard or mouse operation—QuickTest simulates a click on a button in a window or a press of a keyboard key.
Close application process—QuickTest closes specified processes.
Restart Microsoft Windows—QuickTest restarts Microsoft Windows.
Function call—QuickTest calls a VBScript function.
Different Post-Recovery Test Run Options:
Repeat current step and continue
The current step is the step that QuickTest was running when the recovery scenario was triggered.
Proceed to next step
Skips the step that Quick Test was running when the recovery scenario was triggered.
Restart current test run
Stops performing steps and re-runs the component from the beginning.
Stop the test run
Stops running the component.
Associating Recovery Scenarios with the test:
While associating the recovery with your test, you need to specify when you want to activate recovery scenarios i.e. only on errors or on every steps.
If you select On errors option then keep in mind that by default, recovery operations will be activated only when a step returns an error, which can potentially occur several steps after the one that actually caused the error. So you may get the advantages of using recovery scenarios
If you select on every steps then keep in mind that checking for trigger events after every step, may slow performance.

Keyword-Driven Test -Flight Reservation Application Using QTP



Automation Scenarios in Flight Reservation Application
1. Agent Log
2. Insert Orde
3. Open Order
4. Update Order
5. Fax order
6. Delete Order
Exercise:
1. Prepare a test for Agent Login
2. Prepare a test for Insert Order
3. Prepare a test for Open Order
4 Prepare a test for Update Order
5. Prepare a test for Fax Order
6. Prepare a test for Delete Order
Prepare Keyword driven test.
Note:
1. Create an Excel file with 2 sheets titled Test Cases and Test Steps
to store test cases and test steps in the given format in Solutions section.
2. Associate the Environment Variables File to the Keyword Driven Test
3. Associate an Object Repository File that contains all objects to Keyword-driven Test..
4. Associate Function Library File to store all functions and procedures and associate it to keyword-driven Test.
Solution:
1. Create an Excel file with 2 Sheets titled “Test Cases” and “Test Steps” and specify the following.
Test Cases

Tcid
Testcase Desc
Execute
Results
TC001
Check Agent Login with valid inputs
Y

TC002
Check Insert Order with valid inputs
Y

TC003
Check pen Order with valid inputs
Y

TC004
Check Update Order with valid inputs
Y

TC005
Check Fax Order with valid inputs
Y

TC006
Check Delete Order
Y


Test Steps

Tcid
Step id
Step Desc
Results
Keyword
TC001
Step 1
Activate FR Application

LaunchApp
TC001
Step 2
Enter valid Agnet Name,Valid password and click Ok

AgentLogin
TC001
Step 3
Close the FR Application

CloseApp
TC002
Step 1
Activate FR Application

LaunchApp
TC002
Step 2
Login as Agent

AgentLogin
TC002
Step 3
Enter all mandatory fields with valid inputs and click Insert Order

NewOrder
TC002
Step 4
Close the FR Application

CloseApp
TC003
Step 1
Activate FR Application

LaunchApp
TC003
Step 2
Login as Agent

AgentLogin
TC003
Step 3
Click Open Order,Enter a Order No and check the data

OpenOrder
TC003
Step 4
Close the FR Application

CloseApp
TC004
Step 1
Activate FR Application

LaunchApp
TC004
Step 2
Login as Agent

AgentLogin
TC004
Step 3
Open an Order

OpenOrder
TC004
Step 4
Modify necessary fields with valid inputs and click Update

UpdateOrder
TC004
Step 5
Close the FR Application

CloseApp
TC005
Step 1
Activate FR Application

LaunchApp
TC005
Step 2
Login as Agent

AgentLogin
TC005
Step 3
Open an Order

OpenOrder
TC005
Step 4
Go to File select Fax order, enter fax no and click Send

FaxOrder
TC005
Step 5
Close the FR Application

CloseApp
TC006
Step 1
Activate FR Application

LaunchApp
TC006
Step 2
Login as Agent

AgentLogin
TC006
Step 3
Open an Order

OpenOrder
TC006
Step 4
Click Delete Order

DeleteOrder
TC006
Step 5
Close the FR Application

CloseApp

2. Create Global Variables in GlobalVariables.qfl
Public StrApppath,StrAgName,StrPword,DtDateOfFly,StrFlyFrom,StrFlyTo,StrPName
Public intTkts,StrClassOfFly,intOno,intUpdTkts,intFaxNo
StrApppath="C:\Program Files\HP\QuickTest Professional\samples\flight\app\flight4a.exe"
StrAgName="AHAMAD"
StrPword="ahamadqtp"
DtDateOfFly="101010"
StrFlyFrom="Paris"
StrFlyTo="London"
StrPName="ahamad"
intTkts=2
intOno=32
intUpdTkts=3
StrClassOfFly="B"
intfaxNo=1111111111

=======================================================================
3. Create a Function Library File
Function OpenApp (AppPath)
Invoke application AppPath
If Dialog ("Login").Exist (10) Then
Reporter.ReportEvent micPass,"Application Launch”, “Application Launched successfully"
OpenApp="Pass"
Else
Reporter.ReportEvent micFail,"Application Launch”,” Application Launch failed"
OpenApp="Fail"
End If
End Function
======================================================================
Function Login(uid,pwd)
Dialog("Login").WinEdit("Agent Name:").Set uid
Dialog("Login").WinEdit("Password:").Set pwd
Dialog("Login").WinButton("OK").Click
If Window("Flight Reservation").Exist(10) Then
Reporter.ReportEvent micPass ,"Agent Login","Agent Login Successful"
Login="Pass"
Else
Reporter.ReportEvent micFail ,"Agent Login","Agent Login failed for valid inputs"
Login="Fail"
End If
End Function
=======================================================================
Function CloseApp()
Window("Flight Reservation").Close
If not Window("Flight Reservation").Exist(1) Then
Reporter.ReportEvent micPass ,"Application Close","Application Closed Successfully"
CloseApp="Pass"
Else
Reporter.ReportEvent micFail ,"Application Close","Applciation Close Failed"
CloseApp="Fail"
End If
End Function
=====================================================================
Function InsertOrder(DateOfFly,FlyFrom,FlyTo,PName)
Window("Flight Reservation").WinButton("New").Click
Window("Flight Reservation").ActiveX("DateOfFly").type DateOfFly
Window("Flight Reservation").WinComboBox("Fly From:").Select FlyFrom
Window("Flight Reservation").WinComboBox("Fly To:").Select FlyTo
Window("Flight Reservation").WinButton("FLIGHT").Click
Window("Flight Reservation").Dialog("Flights Table").WinList("From").Select(0)
Window("Flight Reservation").Dialog("Flights Table").WinButton("OK").Click
Window("Flight Reservation").WinEdit("Name:").Set PName
Window("Flight Reservation").WinButton("Insert Order").Click
Window("Flight Reservation").ActiveX("MsgControl").WaitProperty "text","Insert Done...",10000
If Window("Flight Reservation").ActiveX("MsgControl").GetROProperty("text")="Insert Done..." Then
Reporter.ReportEvent micPass ,"Insert Order","New Order Created Successfully"
InsertOrder="Pass"
Else
Reporter.ReportEvent micFail ,"Insert Order","New order Creation failed"
InsertOrder="Fail"
End If
End Function
=====================================================================
Function OpenOrder(ono)
Window("Flight Reservation").WinButton("Open").Click
Window("Flight Reservation").Dialog("Open Order").WinCheckBox("Order No.").Click
Window("Flight Reservation").Dialog("Open Order").WinEdit("Edit").Set ono
Window("Flight Reservation").Dialog("Open Order").WinButton("OK").Click
If Cint(trim(window("Flight Reservation").WinEdit("Order No:").GetROProperty("text")))=ono Then
Reporter.ReportEvent micPass ,"Open Order","Open Order Test Passed"
OpenOrder="Pass"
Else
Reporter.ReportEvent micFail ,"Open Order","Open Order Test Failed"
OpenOrder="Fail"
End If
End Function
=====================================================================
Function UpdateOrder(ono,Tkts)
Window("Flight Reservation").WinEdit("Tickets:").Set tkts
Window("Flight Reservation").WinButton("Update Order").Click
Window("Flight Reservation").ActiveX("MsgControl").WaitProperty "text","Update Done...",10000
If Window("Flight Reservation").ActiveX("MsgControl").GetROProperty("text")="Update Done..." Then
Reporter.ReportEvent micPass ,"Update Order","Order Updated Successfully"
UpdateOrder="Pass"
Else
Reporter.ReportEvent micFail ,"Update Order","Update Order Failed"
UpdateOrder="Fail"
End If
End Function
===================================================================
Function FaxOrder(ono,Faxno)
Window("Flight Reservation").WinMenu("Menu").Select "File;Fax Order..."
Window("Flight Reservation").Dialog("Fax Order No. 1").ActiveX("FaxNo").Type "1111111111"
Window("Flight Reservation").Dialog("Fax Order No. 1").WinButton("Send").Click
Window("Flight Reservation").ActiveX("MsgControl").WaitProperty "text","Fax Sent Successfully...",10000
If window("Flight Reservation").ActiveX("MsgControl").GetROProperty("text")="Fax Sent Successfully..." Then
Reporter.ReportEvent micPass ,"Fax Order","Fax Sent Successfully"
FaxOrder="Pass"
Else
Reporter.ReportEvent micFail ,"Fax Order", "Fax Sending failed"
FaxOrder="Fail"
End If
End Function
====================================================================
Function DeleteOrder(ono)
Window("Flight Reservation").WinButton("Delete Order").Click
Window("Flight Reservation").Dialog("Flight Reservations").WinButton("Yes").Click
Window("Flight Reservation").ActiveX("MsgControl").WaitProperty "text","Delete Done...",10000
If Window("Flight Reservation").ActiveX("MsgControl").GetROProperty("text")="Delete Done..." Then
Reporter.ReportEvent micPass ,"Delete Order","Order Deleted Successfully"
DeleteOrder="Pass"
Else
Reporter.ReportEvent micFail ,"Delete Order","Delete Order Failed"
DeleteOrder="Fail"
End If
End Function
=======================================================================
4. Prepare the Keyword-Driven Test
Option Explicit
Dim TCCount,i,Tcid,TcExeFlg,TsCount,TsTcid,Keyword,Res,j
Datatable.AddSheet "TestCases"
Datatable.AddSheet "TestSteps"
Datatable.ImportSheet "d:\Flight\Keyword.xls","TestCases","TestCases"
Datatable.ImportSheet "d:\Flight\Keyword.xls","TestSteps","TestSteps"
TCCount=Datatable.GetSheet("TestCases").GetRowCount
For i=1 to TCCount
Datatable.GetSheet("TestCases").SetCurrentRow(i)
Tcid=Datatable("Tcid","TestCases")
TcExeFlg=Datatable("Execute","TestCases")
If UCase(TcExeFlg)="Y" Then
TsCount=Datatable.GetSheet("TestSteps").GetRowCount
For j=1 to TsCount
Datatable.GetSheet("TestSteps").SetCurrentRow(j)
TsTcid=Datatable("Tcid","TestSteps")
If Tcid=TsTcid Then
Keyword=Datatable("Keyword","TestSteps")
Select Case Keyword
Case "LaunchApp"
Res=openApp(StrApppath)
Case "AgentLogin"
Res=Login(StrAgName,StrPword)
Case "CloseApp"
Res=CloseApp()
Case "NewOrder"
Res=InsertOrder(DtDateofFly,StrFlyFrom,StrFlyTo,StrPName)
Case "OpenOrder"
Res=OpenOrder(intOno)
Case "UpdateOrder"
Res=UpdateOrder(intOno,intUpdTkts)
Case "FaxOrder"
Res=Faxorder(intOno,intFaxNo)
Case "DeleteOrder"
Res=DeleteOrder(intOno)
End Select
Datatable("Results","TestSteps")=Res
If Datatable("Results","TestCases")<>"Fail" Then
Datatable("Results","TestCases")=Res
End If
End If
Next
Else
Datatable("Results","TestCases")="Blocked"
End If
Next
Datatable.ExportSheet "d:\Flight\KeywordResults.xls","TestCases"
Datatable.ExportSheet "d:\Flight\KeywordResults.xls","TestSteps"