Академический Документы
Профессиональный Документы
Культура Документы
IVS-TRAINING @
Ground Rules
Stick
to timeliness Help each other in learning as learning is a continuous process Please participate actively to make the session interactive.
IVS-TRAINING @
Session Objectives
A comparison between QTP and other testing automation tools Object Repository Type and Object Recognition Object Identification Recording Modes Context sensitive, Lowlevel and Analog Recording Virtual Objects Global Object Repository Implementing Global Object Repository Releasing Objects Regular Expressions
IVS-TRAINING @
IVS-TRAINING @
QTP
Windows
WinRunner
Windows, Citrix and Microsoft Terminal Server environments
Platform Browser
Netscape, IE, AOL, Applications Internet explorer all versions, with embedded Web browser Netscape 4.05 to 4.79 and 6.1,7.1 control. and above HTML, DHTML, Java Script, VBScript, Active X, Java Apps, MFC(C, C++) Legacy applications
3.
Technology Windows MFC (Microsoft Foundation Classes), Visual C+ +, Visual Basic, Web, Active X, Mainframe (3270/5250) and Microsoft .NET-based applications Script Language GUI Repository VBScript
4. 5.
Called Object Repository can be GUI Based stored on per-action basis or as Global Object repository
IVS-TRAINING @
QTP
Browser
Netscape, IE, AOL, Applications IE 4.01+, Netscape Navigator 4.0.8, with embedded Web browser Netscape Communicator 4.5, 4.6, and control. 4.7 Web, Java, ERP/CRM, Character based wireless and PDA Applications, Client/Server applications and emulator based applications: UNIFACE, Siebel, SAP, Oracle, PeopleSoft and PowerBuilder QA Run Script
2.
Technology / Windows MFC (Microsoft Protocols Foundation Classes), Visual C+ +, Visual Basic, Web, Active X, Mainframe (3270/5250) and Microsoft .NET-based applications Script Language GUI Repository VBScript
3. 4.
Called Object Repository can be GUI / Text stored on per-action basis or as Global Object repository No
5.
6.
No
IVS-TRAINING @
IVS-TRAINING @
IVS-TRAINING @
Action1
Action2
Action3
Action1
Action2
Action3
Action1
Action2
Action3
IVS-TRAINING @
Utilities Provided with the latest version Object Repository maintenance is one key area concentrated on in the latest version of QTP. For maintenance of repository, few new options have been provided like :
IVS-TRAINING @
IVS-TRAINING @
IVS-TRAINING @
IVS-TRAINING @
IVS-TRAINING @
Options are available to the user Selected properties will be made mandatory in this case Selection of properties should be based on nature of application Same is applicable to assistive properties
IVS-TRAINING @
Example
ADP
Mandatory Properties: Html tag: Text: Inner Text: Assistive Properties: Name: Outer text: URL: Color: Font: adp Adp www.adp.com red Arial During recording QTP has stored both the mandatory as well as assistive properties for identifying the particular link. Lets check why? A ADP adp
IVS-TRAINING @
ADP
Checking to identify the object using Checking to identify the object using Checking to identify the object using the captured identify the properties mandatory Checking to identify the object using the captured mandatory properties Checking to identify the object using the captured mandatory properties Checking tois mandatory properties object using the capturedassistiveidentify the link Now QTP 1 able to property andwith 2 assistive properties with the captured mandatory properties and with 3 assistive properties the captured 3 Mandatory properties and with 4 assistive properties with captured mandatory properties and with 5 assistive properties andand 5 Assistive properties!!
QTP uses Assistive properties if the stored Mandatory properties are not enough to identify an object
IVS-TRAINING @
If mandatory properties and assistive properties are insufficient to identify an object during record session
QTP uses Ordinal Identifier in addition to other captured properties to identify the objects during a record session
IVS-TRAINING @
Object Repository Type and Object Recognition (Contd) Types of Ordinal identifiers: 1.Index based 2.Location based 3.Creation Time
Index: Indicates the order in which the object appears in the application code relative to
other objects. Eg., pressing a tab and giving numbers to objects
Location : Indicates the order in which the object appears within the parent window, frame,
or dialog box relative to other objects with an otherwise identical description
CreationTime (Browser object only) : Indicates the order in which the browser was
opened relative to other open browsers with an otherwise identical description.
An ordinal identifier is selected by default for each test object class. To modify the selected ordinal identifier, select the desired type from the Ordinal identifier box.
IVS-TRAINING @
IVS-TRAINING @
Example:
Numbered based on location property
IVS-TRAINING @
IVS-TRAINING @
Click OK to close the Add/Remove Properties dialog box. The updated set of base filter properties is displayed in the Base Filter Properties list. In the Optional Filter Properties list, click Add/Remove. The Add/Remove Properties dialog box for optional filter properties opens. Same applies for optional properties also. Use the up and down arrows to set your preferred order for the optional filter properties.
IVS-TRAINING @
MS Paint If recorded using Context sensitive mode, You will not get any drawing during playback
MS Paint If recorded using Analog mode, You will be able to replay it back successfully
IVS-TRAINING @
Click Next
Class can be Object, Button, Table, List, Check box & Radio button. Mark a class based on the object which is present in the application Eg., Mark radio button from the drop down shown, if QTP has failed to identify a radio button in the application during recording a script
IVS-TRAINING @
Step4
Step6
Step5
IVS-TRAINING @
IVS-TRAINING @
If the user is concerned about one or more specific variable value or values of some vbscript expression, then the user can enter those variable names in the first column of the watch expression tab. When the test case is run in a step-by-step mode using breakpoints, we can see the current value of the variables/ vbscript expression entered in the first column of the watch expression tab.
IVS-TRAINING @
Commands: This tab helps in modifying the values of the variables at run time (while executing the script in step-by-step format). During execution, user can insert breakpoint and the execution will suspend when it reaches any break point.
IVS-TRAINING @
For eg. the user enters strVarName = Hi this is the new value in the Command tab. After entering the new value, if the user starts running the script from that step, the new value will be considered as the current value of the variable. By changing the variable value during the execution time, user can make sure if the variable attains the mentioned value.
IVS-TRAINING @
IVS-TRAINING @
IVS-TRAINING @
IVS-TRAINING @
IVS-TRAINING @
To set an optional step in the Keyword View, right-click a step and choose Optional Step. The Optional Step icon is added next to the selected step. An optional step can be added in the Expert View by adding OptionalStep to the beginning of the VBScript statement. Example: OptionalStep.Browser("browser_name").Page("page_name").Link("link_name")
IVS-TRAINING @
Step6: Step5: Define any without making any Manager Step4: Enter on New Scenario event changes Step3: Selectappropriate information you require Step2: Next Tools > the triggerScenarioclick on next button Step1: Click buttonof Recovery button based on your trigger event a recovery operation and
IVS-TRAINING @
Step12: Step11: Step10: you need recovery scenarios proceed on available Next Step9: Clickappropriate like to quit or and click likenext buttonoptions Step8: IfEnter finishanotheroperation operation checkmouse operation Step7: Enter the recoveryinformationyou require withprevious choice Scenario Name and add a description the click post if you recovery based on your and check box
IVS-TRAINING @
Since there is limited time for the Recovery Scenario to kick off, the most frequently used recovery scenario should be at the top of the list and the list should later be refined as the interaction with the AUT increases.
i.e. if we have a wait statement after a particular step (say for about 15 sec) then the Recovery Scenario will not get executed for the entire wait period and in the meantime it is quite possible that the AUT has moved from the screen that was expected resulting in a failure of the Recovery Scenario
IVS-TRAINING @
IVS-TRAINING @
Introduction:
Test Management tool from Mercury Interactive Using Quality Center we can manage the Requirements, Create Test cases, Execute test cases, report results and map all these together and create reports, schedule the execution of Test cases etc.
Why to Integrate QTP with Quality Center? Automated test cases through QTP can be directly stored in to Quality Center. With little configuration, we can integrate Quality Center with QTP and we can run test cases directly from Quality Center. We can directly store test cases to Quality Center with the option Quality Center Connection available in QTP. Test results will be automatically updated in the Quality Center if we run the automated scripts through Quality Center.
IVS-TRAINING @
IVS-TRAINING @
Add Domain, your project name, user name and password provided for Quality Center in appropriate boxes and click on connect button
IVS-TRAINING @
IVS-TRAINING @
When the check box Submit a defect to Quality Center is checked, the defect will be reported automatically in TD.
IVS-TRAINING @
2)
3) 4) 5)
6) 7)
While using QTP: The object that QTP is trying to access may not exist or is disabled. For e.g. while trying to access a particular Button, the button may be disabled. In that case a runtime error would be thrown by QTP. Proper exception handling has to done in such cases. If an action is being called in a script then the local data sheet of that script is Read Only in the calling Script. This does not allow the data to be modified. The workaround would be to keep all the data that is needed to be modified in the Global data sheet of the action. The hierarchy of actions has to be taken care of, i.e., the previous action should end only where the new action is to begin. Care should be taken that the settings on the PCs where the script is made and the script is run should be same. For this the Generate script command is used. Care should be taken that actions calls are not hard coded to make the scripts generic. The folders should be properly mapped from the a centralized location so that every one running the script should be able to successfully run the script. Recovery scenario are not invoked if QTP is in wait state and this is not mentioned anywhere in help either. TE add - in for QTP doesnt support all TE applications. Only a selected few environments are supported.
IVS-TRAINING @
Summary
This presentation has described the following features of QTP for advanced learners. Why QTP is the preferred choice for automation now days Basics about object identification Global Object Repository Exception Handling and Recovery Scenario concepts Analysis of Results Integration with Quality Center Some points to keep in mind while using QTP
IVS-TRAINING @
References
Quick Test Pro 9.5 Help Quick Test Pro 9.5 Tutorial
IVS-TRAINING @
Q&A
IVS-TRAINING @
Thank You!!
IVS-TRAINING @