This action might not be possible to undo. Are you sure you want to continue?
An Advance Guide Valuable Resource for Certification Exam HPO-M39
>>>>>>>>>>>> www.softwaretestinggenius.com <<<<<<<<<<<<
♠ Object Repository Type and Object Recognition ♠ Shared Object Repository ♠ Checkpoints ♠ Transactions and Step Generators ♠ Exception Handling and Recovery Scenarios ♠ Analysis of Test Results
>>>>>>>>>>>> www.softwaretestinggenius.com <<<<<<<<<<<<
Object Repository Type and Object Recognition
What is an Object Repository ?
Object Repository is a collection of objects pertaining to the application under test. Example: All the text boxes, list boxes, images etc are stored in a file in QTP. This file is called the object repository. Each object will have the set of properties to identify that object uniquely in the application. At the time of execution, QTP identifies the objects on the screen by comparing them with the objects and their properties in the repository.
We can have any number of Shared Object Repositories associated with an action. In QTP 10.0 all the objects are recorded into the local repository and then we need to export the objects from local repository into the shared object repository by opening the object repository and selecting File Menu and selecting "Export Local Objects". We need to specify the name for the shared object repository in which we want to save these objects.
>>>>>>>>>>>> www.softwaretestinggenius.com <<<<<<<<<<<<
com <<<<<<<<<<<< .softwaretestinggenius.Object Repository Type and Object Recognition ♥ Object Identification ♥ Recording Modes: Context sensitive Mode Low-level Mode Analog Recording Mode ♥ Virtual Objects >>>>>>>>>>>> www.
Object Repository Type and Object Recognition ♠ Types of Object Repository ♦ Per – action object repository ♦ Shared object repository ♠ Per – action object repository ♦ ♦ ♦ ♦ Default repository Specific to actions (Will be used only for a particular action) Preferable when application is not dynamic with respect to time Cannot be reused >>>>>>>>>>>> www.com <<<<<<<<<<<< .softwaretestinggenius.
com <<<<<<<<<<<< . >>>>>>>>>>>> www.softwaretestinggenius.Object Repository Type and Object Recognition ♠ Per – action object repository ♦ Default repository ♦ Specific to actions (Will be used only for a particular action) ♦ Preferable when application is not dynamic with respect to time ♦ Cannot be reused Example Action1 and Action 2 of same test will have different object repositories.
Object Repository Type and Object Recognition ♠ Shared Object Repository ♦ Can be updated by all actions accessing it ♦ Preferable when application is dynamic with respect to time ♦ Used in most automation projects ♦ Needs maintenance and administration >>>>>>>>>>>> www.softwaretestinggenius.com <<<<<<<<<<<< .
com <<<<<<<<<<<< .softwaretestinggenius.Object Repository Type and Object Recognition Shared object repository may be common to all tests and to all actions inside each test Shared object repository Test1 Test2 Test3 Action1 Action2 Action3 Action1 Action2 Action3 Action1 Action2 Action3 >>>>>>>>>>>> www.
com <<<<<<<<<<<< .Object Repository Type and Object Recognition What is Object Identification? Object identification is a method of instructing QTP to recognize the various objects in the application. but for some applications this may not be true.softwaretestinggenius. Usually QTP can identify the objects uniquely for most of the applications/objects. for recognizing the objects uniquely. >>>>>>>>>>>> www. In this scenario we need to tweak the Object Identification settings of QTP to learn extra properties or custom properties defined in the application.
com <<<<<<<<<<<< . web etc). This will give you all the possible type of objects in that environment like Edit boxes.Object identification . You can select the extra properties which are already defined in the application for that kind of object by clicking on the green "+" sign and selecting the required properties.softwaretestinggenius.Tools . >>>>>>>>>>>> www. Select the type of object you have problem recognizing uniquely.Object Repository Type and Object Recognition How to do Object Identification in QTP? Go to . If you still have the problem of recognition then you need to find out the unique property defined for that object type from the development team and Add that custom property by clicking "New" in the Add/Remove properties window of Object identification. check boxes etc. QTP will show you the mandatory and assistive properties which are grabbed and used currently for that object.and select the environment (windows.
softwaretestinggenius. >>>>>>>>>>>> www.com <<<<<<<<<<<< . Note: The changes you make in the Object Identification will affect everyone working on that machine. These changes should be applied universally on all the machines you intend to run the regression tests.Object Repository Type and Object Recognition How to do Object Identification in QTP? If you still have the problem of recognition then you need to find out the unique property defined for that object type from the development team and Add that custom property by clicking "New" in the Add/Remove properties window of Object identification. These are QTP setting changes not the script changes. For example if the custom property name is "RefGen". you can click "New" and give the new property name as "attribute/RefGen". When you record next time on that kind of object the new properties will be automatically grabbed. If you want to update the existing objects run the test in the Update Run mode and select the checkbox Update Object Properties.
objects of same class object.Object Repository Type and Object Recognition Object Identification User can specify properties to be used for identification to distinguish between 2 .softwaretestinggenius. >>>>>>>>>>>> www.com <<<<<<<<<<<< .
softwaretestinggenius.com <<<<<<<<<<<< .Object Repository Type and Object Recognition Configuring Mandatory and Assistive Recording Properties: ♥ Mandatory properties: >>>>>>>>>>>> www.
com <<<<<<<<<<<< . It uses assistive properties when mandatory properties are not enough to identify an object. >>>>>>>>>>>> www.Object Repository Type and Object Recognition Mandatory properties: ♥ QTP has list of mandatory properties. for each type of object.softwaretestinggenius. which it always learns. ♥ When we run the script QTP uses all the mandatory properties to identify the object.
com <<<<<<<<<<<< . ♥ We can add /remove few properties in mandatory properties or assistive properties so that QTP identifies the object when we run the script >>>>>>>>>>>> www.softwaretestinggenius.Object Repository Type and Object Recognition ♥ We can change the mandatory properties or assistive properties based on the application.
softwaretestinggenius.Object Repository Type and Object Recognition ♠ How to change properties of objects? ♥ Tools Object Identification ♥ Object Identification dialog box opens ♥ Select the properties you want to make mandatory or assistive by selecting the option • 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 >>>>>>>>>>>> www.com <<<<<<<<<<<< .
softwaretestinggenius.com <<<<<<<<<<<< .Object Repository Type and Object Recognition Recording Example… Mandatory Properties: Html tag: Text: Inner Text: A Testing Testing During recording QTP has stored both the mandatory as well as assistive properties for identifying the particular link. Let us check why? Recording a link… Assistive Properties: Coordinate X: Coordinate Y: URL: Color: Font: Green Arial 256 298 >>>>>>>>>>>> www.
Object Repository Type and Object Recognition Mandatory Properties: Html tag: Text: Inner Text: A Testing Testing During Recording Now QTP is able to identify the link with captured 3 Mandatory properties and 5 Assistive properties!! Starts using assistive properties and checks object Includes 1st Property n d Assistive Properties: Coordinate X: 234 Includes 2 Property Coordinate Y: 286 URL: www.abcd.com Includes 3rd Property Color: Font: Orange Arial 5th 4th QTP uses Assistive properties if the stored Mandatory properties are not enough to identify an object >>>>>>>>>>>> www.softwaretestinggenius.com <<<<<<<<<<<< .
During a Record Session 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 >>>>>>>>>>>> www. Ordinal identifier is used if mandatory properties and assistive properties captured by QTP is insufficient to identify an object in the application during record session.com <<<<<<<<<<<< . In other words.Object Repository Type and Object Recognition Selecting an Ordinal Identifier: ♥ In addition to mandatory properties and assistive properties. QTP records backup ordinal identifier for each test object ♥ Used when QTP is not able to identify an object with captured mandatory properties and assistive properties during recording.softwaretestinggenius.
>>>>>>>>>>>> www. Eg. An ordinal identifier is selected by default for each test object class.. pressing a tab and giving numbers to objects Location: Indicates the order in which the object appears within the parent window.com <<<<<<<<<<<< . select the desired type from the Ordinal identifier box.softwaretestinggenius. 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.Object Repository Type and Object Recognition Types of Ordinal identifiers: ♥ Index based ♥ Location based ♥ Creation Time Index: Indicates the order in which the object appears in the application code relative to other objects. frame. To modify the selected ordinal identifier.
The first occurrence is 0. >>>>>>>>>>>> www. Options for Web Options for other Environments Identifying an Object Using the Index Property: QuickTest can assign a value to the Index test object property of an object The value is based on the order in which the object appears within the source code. Location and Creation time.softwaretestinggenius. This Creation Time is not available in the ordinal identifier options of other environments.Object Repository Type and Object Recognition Setting up which ordinal identifier to use during object identification: ♥ User can select which ordinal identifier to be used by selecting the options in object identification ♥ The ordinal identifier in web will have three options namely Index.com <<<<<<<<<<<< .
♥ The value is based on the order in which the object appears within the window. First occurrence value = 0 ♥ Values are assigned in columns from top to bottom. frame. in relation to other objects with the same properties.com <<<<<<<<<<<< . and left to right. or dialog box.softwaretestinggenius. QuickTest can assign a value to the Location test object property of an object in order to uniquely identify the object. Example: Numbered based on location property >>>>>>>>>>>> www.Object Repository Type and Object Recognition Identifying an Object Using the Location Property: ♥ During recording.
QuickTest is unable to uniquely identify a browser object based solely on its test object description. ♥ This value indicates the order in which the browser was opened relative to other open browsers with an otherwise identical description. it assigns a value to the CreationTime test object property. and then uses the CreationTime property to identify the correct one. if QuickTest is unable to identify a browser object based solely on its test object description.softwaretestinggenius. ♥ During the run session. Opening a new browser with an application Opening a new browser with same application QTP notes the creation time of both browsers as creation time property Example >>>>>>>>>>>> www.Object Repository Type and Object Recognition Identifying an Object Using the CreationTime Property : ♥ During recording. it examines the order in which the browsers were opened.com <<<<<<<<<<<< .
then it goes for smart identification mechanism.softwaretestinggenius. even if some of the properties in the object's recorded description have changed. ♥ Smart identification uses two types of properties and are base filter properties and optional filter properties >>>>>>>>>>>> www. If its not able to identify the object with the description.Object Repository Type and Object Recognition Configuring Smart Identification: ♥ Configuring Smart Identification properties enables you to help QuickTest identify objects in your application.com <<<<<<<<<<<< . About Configuring Smart Identification: ♥ QTP uses object description for identifying an object.
com <<<<<<<<<<<< . but can be ignored if they are not applicable.Object Repository Type and Object Recognition Base Filter Properties: ♥ Most fundamental properties of object class or values which cannot be changed without changing the essence of the original object. if a Web link's tag was changed from <A> to any other value. you could no longer call it the same object.. Optional Properties: ♥ Other properties to identify objects for a particular class as they are unlikely to change on regular basis.softwaretestinggenius. >>>>>>>>>>>> www. Eg.
com <<<<<<<<<<<< . ♥ The Smart Identification Properties dialog box opens: >>>>>>>>>>>> www. ♥ Select the appropriate environment in the Environment list.softwaretestinggenius. The test object classes associated with the selected environment are displayed in the Test object classes list. ♥ Select the test object class you want to configure. ♥ Click the Configure button next to the Enable Smart Identification check box. The Configure button is enabled only when the Enable Smart Identification option is selected.Object Repository Type and Object Recognition Step-by-step Instructions for Configuring a Smart Identification Definition: ♥ Tools > Object Identification. The Object Identification dialog box opens.
.Object Repository Type and Object Recognition Base filters & Optional filters: ♥ In the Base Filter Properties list. Click OK to close the Add / Remove Properties dialog box. click Add/Remove. Use the up and >>>>>>>>>>>> down arrows to set your preferred order for the optional <<<<<<<<<<<< www.softwaretestinggenius. The Add/Remove Properties dialog box for optional filter properties opens. ♥ Select the properties you want to include in the Base Filter Properties list and/or clear the properties you want to remove from the list. click Add/Remove.com filter properties. ♥ The Add/Remove Properties dialog box for base filter properties opens. The updated set of base filte properties is displayed in the Base Filter Properties list. Same applies for optional properties also. In the Optional Filter Properties list.
. Analog Recording: ♥ Records the exact mouse and keyboard operations you perform in relation to either the screen or the application window. Low-level and Analog Recording Context sensitive: ♥ This is the Default mode of recording which takes full advantage of QuickTest's test object model. Eg. You will be replay it back successfully >>>>>>>>>>>> www. ♥ Records the objects in your application and the operations performed on them.Object Repository Type and Object Recognition Recording Modes – Context sensitive.softwaretestinggenius. You will not get any drawing during playback MS Paint If recorded using Analog mode. ♥ QTP’s Analog recording is captured as Tracks and stored in the directory of your test ♥ Useful for recording operations that cannot be recorded at the level of an object. ♥ Recognizes objects in application regardless of their location on the screen.com <<<<<<<<<<<< . A signature produced by dragging the mouse in a paint will be recorded in analog recording MS Paint If recorded using Context sensitive mode.
softwaretestinggenius. ♥ Used when the exact coordinates of the object are important for your tests. ♥ Used when recording tests in an environment (or on an object) not recognized by QuickTest. Low-level and Analog Recording Low Level Recording: ♥ Enables you to record on any object in your application. ♥ Records at the object level and records all run-time objects as Window or WinObject test objects. >>>>>>>>>>>> www.Object Repository Type and Object Recognition Recording Modes – Context sensitive. whether or not QuickTest recognizes the specific object or the specific operation.com <<<<<<<<<<<< .
g..VirtualObject(“A").softwaretestinggenius. E.ActiveX(“Z").Page(“Y").com <<<<<<<<<<<< . Syntax: Browser(“X"). user can avoid scenarios which may stop automation of a test scenario.Object Repository Type and Object Recognition Virtual Objects: ♥ Substitutes for standard objects ♥ Used when standard objects cannot be recorded due to problems that arise during recording ♥ Virtual objects cover the regions in the application that QTP has failed to identify.. Try creating a cell in excel sheet as Virtual Object and try recording it and check the script The following example clicks the "button" VirtualButton. ♥ Create virtual objects and start recording. That particular part of application will be covered and marked as virtual object in the script.Click >>>>>>>>>>>> www. QTP can fail to identify certain objects in the application screen. We will not be able to proceed on with recording the remaining part of the script without the line. Scenario: ♥ During recording. ♥ By creating virtual objects.
Mark a class based on the object which is present in his application Eg. Check box & Radio button.softwaretestinggenius.com <<<<<<<<<<<< .. List. Button. Mark radio button from the drop down shown if QTP has failed to identify a radio button in the application during recording a script Next page for next step >>>>>>>>>>>> www.Object Repository Type and Object Recognition Defining a Virtual Object: ♥ Click Tools > Virtual Object > New Virtual Object ♥ You will get the steps as mentioned below Click Next Class can be Object. Table.
Object Repository Type and Object Recognition Step3 Step4 Click Mark Object button (The QTP screen is minimized) You will get a cross hairs pointer Use the cross hairs pointer to mark the object in application You can select entire parent hierarchy or parent only Step6 Step5 Add virtual object to a collection >>>>>>>>>>>> www.com <<<<<<<<<<<< .softwaretestinggenius.
Shared Object Repository >>>>>>>>>>>> www.softwaretestinggenius.com <<<<<<<<<<<< .
Shared Object Repository Shared object repository Test1 Action1 Action2 Action3 Action1 Test2 Action2 Action3 Action1 Test3 Action2 Action3 >>>>>>>>>>>> www.com <<<<<<<<<<<< .softwaretestinggenius.
Reusability of objects Changes in object properties can be updated directly in the shared object repository model >>>>>>>>>>>> www.Shared Object Repository Same object repository for related functionalities across different actions or scripts It is also possible to add new objects to the existing repository either manually or while recording We can also specify additional properties for objects other than mandatory ones that appear when the objects are captured.com <<<<<<<<<<<< .softwaretestinggenius.
Inserting Shared Object Repositories: There are two ways of adding shared object repositories to a test script 1) At design time 2) At run .Shared Object Repository Implementing Shared Object Repository: The object repository can be managed using a folder containing all the object repositories which have been used throughout the project.com <<<<<<<<<<<< .time Same object repository for related functionalities across different actions or scripts >>>>>>>>>>>> www.softwaretestinggenius.tsr files) are stored module wise. Files under this which contain object repositories (which are stored as .
softwaretestinggenius. Click on Apply button and then click on the OK button. Now all the actions in this particular script can use the objects present in the added shared object repository. Enter the path of the shared object repository in the text box given in the Object repository type frame.Shared Object Repository Steps to add a shared object repository : Open the Quick Test script. Select the “Resources” tab in the Test Settings window. >>>>>>>>>>>> www. Click on the Shared radio button under Object repository type frame. Go to Test Settings in the menu bar.com <<<<<<<<<<<< .
Application") newApp.Visible = True 'Create the Application object ‘Start QuickTest 'Make the QuickTest application visible Set newObjRepository = newApp.ObjectRepositoryPath = strObj_Path >>>>>>>>>>>> www.Shared Object Repository VB Script for creating shared object repository at run-time Option Explicit On error resume next Dim newApp Dim newObjRepository Dim strObj_Path 'As newApplication declare the Application object variable 'As newObjectRepository 'Declare a Repository Object Variable ' To Set the Shared Object Repository Path ' Open QuickTest and prepare objects variables Set newApp = CreateObject("QuickTest.Resources strObj_Path = <path of the object repository> newObjRepository.softwaretestinggenius.Launch newApp.Test.com <<<<<<<<<<<< .Settings.
Click on the button highlighted in the snapshot given in next page 4. We release this memory space at the end of each action to enhance the performance of the script. Select the Object property of the object that needs to be regularised. Go to Tools Object repository in a Quick Test script. Click on the Shared radio button under Object repository type frame.com <<<<<<<<<<<< . Click on the No button to use “. In the Confirmation window that appears. Select the “Resources” tab in the Test Settings window. The extract given below is included at the end of each action to release the objects. Set newApp = Nothing ‘Release the Application object Set newObjRepository = Nothing 'Release the object repository object Regular Expressions Regular Expression is similar to the usage of wild card characters in search functionalities.*” as a regular expression and not as characters.Shared Object Repository Releasing Objects When we add object repositories to a test script during run – time. Go to Test Settings in the menu bar. 6. 7. 5. Steps to use regular expression: 1. >>>>>>>>>>>> www. Click on OK button in the Constant Value Options. 2.softwaretestinggenius. Open the Quick Test script. 8. 3. a particular memory space is allocated to each of the object.
*”.softwaretestinggenius.Shared Object Repository There are other types of regular expressions that can be used apart from “. %.com <<<<<<<<<<<< . The basic function of an ORM is to take back up of the object repositories from time to time to prevent object repositories from becoming corrupt. Shared object repository needs Object Repository Manager for managing all the object repositories. such as \ . etc. >>>>>>>>>>>> www.
Check Points >>>>>>>>>>>> www.softwaretestinggenius.com <<<<<<<<<<<< .
Check Points What is a Checkpoint? A confirmation or verification point in which the value of some property which is expected at a particular step is compared with the actual value which is displayed in the application is called a Checkpoint. >>>>>>>>>>>> www.softwaretestinggenius.com <<<<<<<<<<<< .
Check Points The expected value can be property of an image or web page or a table with values displayed in application.softwaretestinggenius. portion of text or text displayed in a specified region. bitmap of image displayed or dynamic text displayed from XML.com <<<<<<<<<<<< . Check points are Classified as under: Standard Checkpoint Page Checkpoint Text / Text Area Checkpoint Image Checkpoint Database Checkpoint XML Checkpoint Bitmap Checkpoint Table Checkpoint Accessibility Checkpoint >>>>>>>>>>>> www. a dynamic value displayed in application from database.
A user who records a standard check point can select the properties of any property he wishes to check. button. images and links. User can select few values in the table or select all the values as expected value. drop downs. QTP will check only the fields specified by the user. combo boxes. The value column is stored as expected result and can be modified or parameterised when creating and modifying checkpoint. >>>>>>>>>>>> www. Expected result If the value in the application is displayed as a table then this check point is called as Table Checkpoint. Object can be radio button.Check Points Standard Checkpoint: Standard Checkpoint checks for property value of object displayed in any application. User also has options to parameterize the values.softwaretestinggenius.com <<<<<<<<<<<< .
Load time: The time taken by a web page to load. HTML Source and Tags verification and checking for broken lines. number of images or links in a web page. checking every links and images.Check Points Page Checkpoint: A Standard Checkpoint created for a web page can be called a Page Checkpoint.com <<<<<<<<<<<< . Number of links and images present in a web page Consider this a web page Process Assets Process DB Reports Prospective Business Module Project Budgeting System Project Setup Proposal Information System Order Login Print Close QTP Results: No of Links: 6 No of Images: 4 >>>>>>>>>>>> www.softwaretestinggenius. A user who uses this check point can give approximate amount of time that will be required for the page to load so that QTP will fail this checkpoint when page takes more time to load than specified. Page Checkpoint includes checking Load time.
Check Points Checking links and images: User can check all the links and images present in his application with the links and images expected with a page checkpoint.softwaretestinggenius.com <<<<<<<<<<<< . Checkpoint results will show the expected and actual result obtained as shown below. HTML Source of a web page and broken lines in a web page can also be checked using a page check point >>>>>>>>>>>> www.
Options will be provided to the user to export the contents to excel sheet in the same format >>>>>>>>>>>> www. space mismatches and for exact matches. QTP verifies whether the expected text with the actual text appearing and shows output as shown below.softwaretestinggenius. A text mismatch will be shown as represented above. Text Checkpoint can check for case sensitivity. We can store the expected text that should be present in the application when creating this checkpoint.Check Points Text/Text Area Checkpoint: Checks the text present in a web page or any application. These three options can be configured by the user as shown Expected result is shown in green color and actual content that captured in the web application is shown in red color.com <<<<<<<<<<<< .
User will write a SQL query when creating this checkpoint with which QTP will check the dynamic values displayed in application.com <<<<<<<<<<<< .Check Points Database Checkpoint: Compares the dynamic values displayed in the application with the values from the database. Application Software Testing India Query written in QTP to check random values: Select * from data where company = ‘Software Testing’.softwaretestinggenius. Total number of Client : 10 Total number of employees: 2500 Total number in onsite: 200 Number in offshore : 3200 Values retrieved from database by QTP Cl_num 10 emp_num 2500 on_num 200 off_num 3200 Dynamic values from database >>>>>>>>>>>> www.
Application Software Testing India Query written in QTP to check random values: Select * from data where company = ‘Software Testing Genius’.Check Points Database Checkpoint: Compares the dynamic values displayed in the application with the values from the database.com <<<<<<<<<<<< .softwaretestinggenius. User will write a SQL query when creating this checkpoint with which QTP will check the dynamic values displayed in application. Total number of Client : 10 Total number of employees: 2500 Total number in onsite: 200 Number in offshore : 3200 7000 700 Values retrieved from database by QTP Cl_num 10 emp_num 2500 on_num 200 off_num 3200 Dynamic values from database >>>>>>>>>>>> www.
there will be several places for which data from XML will be displayed . The contents displayed in a web application from XML is checked Expected input values can be parameterized XML Schema can also be validated with the checkpoint >>>>>>>>>>>> www. QTP helps in comparing the values in the XML with the values displayed in application and also can validate the schema of XML.com <<<<<<<<<<<< .Check Points XML Checkpoint: In web application.softwaretestinggenius.
QTP will check whether the expected bitmap which is recorded previously exists in the application and provide us with appropriate results.com <<<<<<<<<<<< . Mismatch! Bitmap Checkpoint Failed >>>>>>>>>>>> www.Check Points Bitmap Checkpoint: A Bitmap checkpoint helps a user in checking bitmap of an image or a full web page. Usually users should create record this checkpoint in prototype and will use the application for running.softwaretestinggenius.
We can instruct QTP for doing automatic accessibility checkpoint for every page we browse with the options provided. When you insert Accessibility checkpoint using QTP for all pages in your application.com <<<<<<<<<<<< . it checks whether every page of the application follows the guidelines of W3C.Check Points Accessibility Checkpoint: This checkpoint is specific to Web applications. >>>>>>>>>>>> www. Consumer can set his preferences for this checkpoint. These guidelines should be strictly followed for all web application. World Wide Web Consortium (W3C) came up with some instructions and guidelines for Web-based technology and information systems.softwaretestinggenius.
com <<<<<<<<<<<< .Transactions and Step Generators >>>>>>>>>>>> www.softwaretestinggenius.
>>>>>>>>>>>> www.Transactions and Step Generators Transactions: Process in your application that you are interested in measuring. Include transactions to the section of your script to measure the time that is taken by your application to run those specified steps.com <<<<<<<<<<<< . Can be inserted anywhere in the script No limits to number of transactions you can create You can create a transaction within a transaction.softwaretestinggenius.
To insert a transaction after the current step. select After current step. . Decide where you want the transaction timing to begin: To insert a transaction before the current step. The Start Transaction dialog box Enter a meaningful name in the Name box.softwaretestinggenius. select Before current step.Transactions and Step Generators Inserting Transactions A transaction is inserted by a method called startTransaction.StartTransaction “Test_Transaction” Click the Start Transaction button opens.com <<<<<<<<<<<< Click OK. Syntax: Services. or choose Insert > Start Transaction. Note: You cannot include spaces in a transaction name. A Start Transaction step is added to the Keyword View. >>>>>>>>>>>> www.
com <<<<<<<<<<<< . To insert a transaction after the current step.softwaretestinggenius. Decide where to insert the end of the transaction: To insert a transaction before the current step. Select the name of the transaction you want to end. >>>>>>>>>>>> www.EndTransaction "Test_Transaction” To end a transaction: Click the End Transaction button or choose Insert > End Transaction. select Before current step. The End Transaction dialog box opens as shown below The Name box contains a list of the transaction names you defined in the current test.Transactions and Step Generators Ending Transactions : A Transaction is ended using the method End Transaction. An End Transaction step is added to the Keyword View. Click OK. select After current step. Syntax Services.
com <<<<<<<<<<<< .Transactions and Step Generators AddWastedTime Method Description This method specifies the wasted time (in milliseconds) for all open transactions.SetTransactionStatus Status >>>>>>>>>>>> www.softwaretestinggenius.AddWastedTime (WastedTime) SetTransactionStatus Method Description Sets the status for all open transactions present Syntax Services. Syntax Services.
Choose Insert > Step > Step Generator or right-click the step and choose Insert Step > Step Generator. In the Step Generator dialog box you can define steps that use: Test object methods and properties Utility object methods and properties Calls to library functions.softwaretestinggenius.com <<<<<<<<<<<< The Step Generator dialog box opens and displays the object from the selected step in the Object box. by selecting from a range of context-sensitive options and entering the required values. and internal script functions To open the Step Generator from the Keyword View or Expert View : While recording or editing. >>>>>>>>>>>> www.Transactions and Step Generators Step Generator: Enables you to add steps quickly and easily. . Alternatively. VBScript functions. press F7. click the step which you want the new step to follow.
If it is not. QuickTest will insert it after this step. 3. (When you finish defining the new step. In the Keyword View or Expert View.com <<<<<<<<<<<< . and choose Step Generator. >>>>>>>>>>>> www. In the Active Screen. Select an object and click OK. right-click the object for which you want to insert a step. 4. click the step which you want the new step to follow. the Object Selection Step Generator dialog box opens.) The Active Screen displays the captured bitmap or HTML source corresponding to the selected step.Transactions and Step Generators To open the Step Generator from the Active Screen while editing: 1. 5. Confirm that the Active Screen is displayed. The Step Generator dialog box opens and displays the object from the selected step in the Object box. choose View > Active Screen or toggle the Active Screen toolbar button.softwaretestinggenius. If the location you clicked is associated with more than one object. 2.
WaitProperty. Numerous other operations such as GetROProperty. or the function that you want the step to use. You can then select the specific object and method for the step. Functions: Enables you to select a function for the step from one or all the available libraries. Utility Objects: Enables you to select a utility object and method for the step.Transactions and Step Generators Defining a New Step: When you define a new step. Selecting the Type of Step to Add In the Category list box. you can choose one of the following options: Test Objects: Enables you to select a test object and method for the step. can be done using this Step Generator function.com <<<<<<<<<<<< . etc.softwaretestinggenius. SetTOProperty. you first select the type of step that you want to add to your test or component. >>>>>>>>>>>> www.
softwaretestinggenius.Exception Handling and Recovery Scenarios >>>>>>>>>>>> www.com <<<<<<<<<<<< .
On Error Go to 0 : This statement is used to disable error handling. despite a run-time error.com <<<<<<<<<<<< . Debugging : ♠ In QTP there is a window called Debugging window which contains three tabs ♠ Watch Expressions ♠ Variables ♠ Command Watch Expressions: ♠ If the user is concerned about one or more specific variable value or values of some vbscript expression.Exception Handling and Recovery Scenarios On Error Resume Next : This statement causes execution to continue. if it is previously enabled using On Error Resume Next. >>>>>>>>>>>> www. ♠ When the test case is run in a step-by-step mode using breakpoints.softwaretestinggenius. then the user can enter those variable names in the first column of the watch expression tab. we can see the current value of the variables/ vbscript expression entered in the first column of the watch expression tab.
com <<<<<<<<<<<< .softwaretestinggenius. user can insert breakpoint and the execution will suspend when it reaches any break point. >>>>>>>>>>>> www. Entire initialized variable names and its current value are displayed. the same will get reflected in the Variables tab. ♣ During execution.Exception Handling and Recovery Scenarios Variables: ♠ User can check all the initialized variables and their values during the program execution in the Variables tab. ♠ During program execution if the value of any variable changes. Hence the user can easily analyze the code with this. Commands: ♣ This tab helps in modifying the values of the variables at run time (while executing the script in step-by-step format).
>>>>>>>>>>>> www. if new value is assigned at this moment. the user enters strVarName = “Hi this is the new value” in the Command tab. ♠ For eg. user can make sure if the variable attains the mentioned value. ♠ After entering the new value. if the user starts running the script from that step.Exception Handling and Recovery Scenarios ♠ Let us assume the variable strVarName = “very good”.com <<<<<<<<<<<< . ♠ By changing the variable value during the execution time. ♠ At this point the user can enter the variable name and assign the new value to check whether the code works fine.softwaretestinggenius. the new value will be considered as the current value of the variable.
Exception Handling and Recovery Scenarios
Automation of QTP:
♠ Let us discuss two scenarios where automation of QTP is preferred. ♠ When more users are involved in an automation project then scripts generated by these users may not be of same standards and hence when integration of scripts gives problems. ♠ When automated scripts are moved to client, in client location, we may need to do configuration of QTP and associate other files/paths such as library files, folder paths, recovery scenario files, environment files etc... ♠ In both these cases lot of effort is required and the person who is doing such configuration must be very sure of what he is doing, otherwise proper execution of the script won’t happen. ♠ We can easily create such programs by utilizing the “Generate Script” functionality provided in QTP. ♠ This “Generate Script” functionality is provided in three places ♠ From these three sections, we can create 3 VBScript files, which can be combined together to create a final VBScript file, if required which can perform all the above mentioned functionalities.
>>>>>>>>>>>> www.softwaretestinggenius.com <<<<<<<<<<<<
Exception Handling and Recovery Scenarios
Generate Script – Object Identification:
♠ In this section we can set the Mandatory properties, Assistive properties, Smart Identification configuration etc for all kinds of objects for all the loaded add-ins.
>>>>>>>>>>>> www.softwaretestinggenius.com <<<<<<<<<<<<
Exception Handling and Recovery Scenarios
Generate Script – Test Settings :
♠ Through the highlighted button, we can generate the script which will set the associated add-ins with this test case, ♠ Run options (Run on all rows, Run one iteration only... for global sheet) Library files, Parameters, Recovery scenario files, ♠ Load environment variable files, Browser navigation timeout settings, Username and Password settings for accessing the application through the Active screen. ♠ The easiest way to create the custom file is by setting the proper configuration once, and generate the script with the help of this button.
>>>>>>>>>>>> www.softwaretestinggenius.com <<<<<<<<<<<<
never. always. execution mode (Fast/Normal). capturing of screen shots during (error. enable/disable the integration of QTP with other mercury tools.Exception Handling and Recovery Scenarios Generate Script – Tools/Options : ♠ In the above mentioned section we can create the script to control the general settings which are applicable for all the test cases. amount of information that should be captured through Active screen. on errors and warnings). >>>>>>>>>>>> www. and advance web settings.com <<<<<<<<<<<< . ♠ We can set the folder paths.softwaretestinggenius.
softwaretestinggenius. if a step in an optional dialog box does not open. ♠ To set an optional step in the Keyword View. ♠ When the run session ends.Link("link_name") >>>>>>>>>>>> www. right-click a step and choose Optional Step.Exception Handling and Recovery Scenarios Optional Steps : ♠ When running a test or component. but the step does not cause the test or component to fail.Browser("browser_name").com <<<<<<<<<<<< . ♠ An optional step can be added in the Expert View by adding OptionalStep to the beginning of the VBScript statement. ♠ Example: OptionalStep. The Optional Step icon is added next to the selected step. QuickTest will bypass this step and continue to run the test.Page("page_name"). a message is displayed for the step that failed to open the dialog box.
This problem may stop execution of tests. you may want to restart a test or component from the beginning.Exception Handling and Recovery Scenarios Recovery Scenarios : ♠ Unexpected events. a window that may pop up on screen. For example. For example. Recovery Operation(s): The operation(s) that need to be performed in order to continue running the test or component. and from which point in the test or component QuickTest should continue.com <<<<<<<<<<<< . clicking an OK button in a pop-up window. and application crashes during a run session can disrupt your run session and distort results.softwaretestinggenius. For example. or restarting Microsoft Windows. or a QuickTest run error. >>>>>>>>>>>> www. Post-Recovery Test Run Option: The instructions on how QuickTest should proceed once the recovery operations have been performed. ♠ The Recovery Scenario Manager provides a wizard that guides you through the process of defining a recovery scenario ♠ A recovery scenario consists of the following: Trigger Event : The event that interrupts your run session. if at all. errors. or skip a step entirely and continue with the next step in the test or component.
Exception Handling and Recovery Scenarios Steps for creation Step 6: Define a recovery operation and click on next button >>>>>>>>>>>> www.com <<<<<<<<<<<< .softwaretestinggenius.
softwaretestinggenius.Exception Handling and Recovery Scenarios Steps for creation Step 12: Click finish if you like to quit or proceed with available options >>>>>>>>>>>> www.com <<<<<<<<<<<< .
Recovery scenarios do not get executed when QTP is in a Wait loop. Since there is limited time for the Recovery Scenario to kick off.com <<<<<<<<<<<< .e.softwaretestinggenius. 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. 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 Take care when using recovery scenarios >>>>>>>>>>>> www.Exception Handling and Recovery Scenarios Care must be taken when you are adding more than one recovery scenario in a script.
com <<<<<<<<<<<< .softwaretestinggenius.Analysis of Test Results >>>>>>>>>>>> www.
Analysis of Test Results >>>>>>>>>>>> www.com <<<<<<<<<<<< .softwaretestinggenius.
. italic. ♥ When the test cases are executed through these automation tools.).. enter the result in the specified row and column in the specified format (Bold. displaying the execution results in a more readable format is called formatting of Result reporting.com <<<<<<<<<<<< . However. These reports can be generated from Test Director. open the excel sheet. excel sheet or Html format will give very clear picture about the result than a text file. >>>>>>>>>>>> www. How is it used? ♥ We can write VBScript library functions which can get the information from calling action/function.Analysis of Test Results What is formatting of Results and when is it used? ♥ After the test execution completes. then it may be difficult for the users to understand the result of such execution.. ♥ Library functions written can be used to create text file to log all the result which in turn will act as log files for the execution of test cases.softwaretestinggenius. but this comes as mandatory if the client is having only QTP and not Test Director.
create one excel file and N no of excel sheets for N no of test cases. it will create a new folder with current system date and time and ♣ Create a new excel file and create one excel sheet for each test case i. ♣ Create one excel file/ sheet for each test case ♣ Create one excel file per test case and N no of sheets for N no of iterations of same test case ♣ Create one Batch folder which will create one excel file/sheet and report the details of all the test cases that was executed in the batch – to give the consolidated information about the execution of the batch.com <<<<<<<<<<<< .Analysis of Test Results Various types ♥ We can write functions such that whenever a test case is run.e. To find the individual execution results.softwaretestinggenius. individual excel file can be analysed. >>>>>>>>>>>> www.
across actions.Analysis of Test Results Environment Variables ♥ Variables that can be set to a particular value and the value can be used throughout the script. ♥ There are two types of environment variables: • Built-in • User-defined Build-in Variables: ♥ As the name suggests.softwaretestinggenius. Built-in environment variables are those environment variables that are predefined User Defined: ♥ User defined environment variables are ones in which the user gives the value and name of the environment variable and this value holds good throughout the script. >>>>>>>>>>>> www.com <<<<<<<<<<<< .
Thank You >>>>>>>>>>>> www.softwaretestinggenius.com <<<<<<<<<<<< .
This action might not be possible to undo. Are you sure you want to continue?
We've moved you to where you read on your other device.
Get the full title to continue listening from where you left off, or restart the preview.