FAQ by parthasamal

VIEWS: 35 PAGES: 21

									How to delete objects from the object repository?
September 17, 2007 by Amit

Removing objects from a local object repository: 1. Go to Resources -> Object Repository. 2. In the Filter combobox, select “Local Objects.” 3. In the object tree, select the object to be removed. 4. Click the delete toolbar button. 5. Click <Yes> to confirm the deletion. 6. Save the test to save the updated local repository. The object, and any children it may have, will be removed. Removing objects from a shared object repository: 1. Go to Resources -> Object Repository Manager. 2. Go to File -> Open. Navigate to the desired Shared Object Repository file. 3. By default, the repository will open in read-only mode. Go to File -> Enable Editing. 4. In the object tree, select the object to be removed. 5. Click the delete toolbar button. 6. Click <Yes> to confirm the deletion. 7. Save the updated shared repository. The object, and any children it may have, will be removed. Posted in Uncategorized | No Comments »

How to add objects to the object repository (QTP 9.0)?
September 17, 2007 by Amit

Adding objects to a local object repository: An object can be added to the local object repository in one of the following ways: 1. Record some actions on the object; this will automatically add this object to the object repository. If you do not need the recorded statements in your script, you can delete them and it will not remove the added object from the object repository. 2. Add objects manually. 1. 2. 3. 4. 5. Go to Resources -> Object Repository. In the Filter combobox, select “Local Objects.” Go to Object -> Add Objects to Local. Click on the object to be added to the repository. If the Object Selection window appears, select the desired object, and click <OK>.

6. If the Add Object to Object Repository window appears, select the appropriate option: To add only the selected object, select the “Only the selected object” radio button. To add the selected object and its child objects of a specified type, select the “Selected object and its descendants of type” radio button. Then, select the checkbox next to the child object types that should be added. 7. Click <OK>. 3. Manually define a new test object. 1. 2. 3. 4. Go to Resources -> Object Repository. In the Filter combobox, select “Local Objects.” Go to Object -> Define New Test Object. Select the appropriate Environment for your test object. For example, to add a Link object, select “Web.” 5. Select the desired test object class for the new object. 6. Enter a name for your test object. 7. Fill in the Test object details as needed. The Test object details area automatically contains the mandatory properties defined for the object class in the Object Identification dialog box. You can add or remove properties as required, and define values for the properties. To add properties, click the “Add description properties” button (with the + icon). Select the properties to be added and click <OK>. To remove properties, select the properties to be removed, and click the “Remove selected description properties” button (with the X icon) 8. Click <Add> to add the new object. 9. Repeat steps d through h as needed. 10. When done, click <Close>. Note: When you manually define an object, QuickTest Professional will not automatically add the object‟s parent. If the parent objects are not present, you will need to define them as well. Once the objects are added to the repository, you can drag-and-drop them to their appropriate positions. 4. Add the object using the Active Screen. 1. In the Active Screen, right-click on the object to be added. 2. Select “View/Add Object.” 3. If the Object Selection window appears, verify the desired object is selected, and click <OK>. 4. In the Object Properties window, click <Add to Repository>.

Adding objects to a shared object repository: An object can be added to a shared object repository in one of the following ways: 1. From a local repository. 2. Add objects manually. 1. Go to Resources -> Object Repository Manager. 2. Go to File -> Open -> <repository to open>. 3. By default the repository will open in read-only mode. Go to File -> Enable Editing. 4. Go to Object -> Add Objects. 5. Click on the object to be added to the repository. 6. If the Object Selection window appears, select the desired object, and click <OK>. 7. If the Add Object to Object Repository window appears, select the appropriate option: To add only the selected object, select the “Only the selected object” radio button. To add the selected object and its child objects of a specified type, select the “Selected object and its descendants of type” radio button. Then, select the checkbox next to the child object types that should be added. 8. Click <OK>. 3. Manually define a new test object. 1. Go to Resources -> Object Repository Manager. 2. Go to File -> Open -> <repository to open>. 3. By default the repository will open in read-only mode. Go to File -> Enable Editing. 4. Go to Object -> Define New Test Object. 5. Select the appropriate Environment for your test object. For example, to add a Link object, select “Web.” 6. Select the desired test object class for the new object. 7. Enter a name for your test object. 8. Fill in the Test object details as needed. The Test object details area automatically contains the mandatory properties defined for the object class in the Object Identification dialog box. You can add or remove properties as required, and define values for the properties. To add properties, click the “Add description properties” button (with the + icon). Select the properties to be added and click <OK>. To remove properties, select the properties to be removed and click the “Remove selected description properties” button (with the X icon) 9. Click <Add> to add the new object.

10. Repeat steps d through h as needed. 11. When done, click <Close>. Note: When you manually define an object, QuickTest Professional will not automatically add the object‟s parent. If the parent objects are not present, you will need to define them as well. Once the objects are added to the repository, you can drag and drop them to their appropriate positions. 4. Merge with another shared object repository. Posted in Object | No Comments »

How to merge object repository files (QTP 9.0)?
September 17, 2007 by Amit

Merging a local object repository with a shared object repository: To merge the contents of a local repository into a shared repository, the shared repository must be associated with the action containing the local repository. In the Object Repository Manager, select the “Update from Local Repository” option. Updating the Shared Object Repository with the objects in the Local Repository will merge all objects from the Local Repository into the Shared Repository. All objects will be removed from the Local Repository. 1. Save the script containing the Local Repository. Open a new test. 2. Go to Resources -> Object Repository Manager. 3. In the Object Repository Manager window, go to File -> Open, and select the Shared Object Repository file. Clear the “Open in read-only mode” checkbox. 4. If the repository file opened in read-only mode, go to File -> Enable Editing. 5. Go to Tools -> Update from Local Repository. 6. Click the “Add Tests” icon button. If you are connected to a TestDirector for Quality Center with Business Process Testing, you will have the option to browse for a test or a component. Select the appropriate choice. 7. Navigate to the test or component containing the Local Repository. Note: You can only add a test containing actions that are associated with the Shared Object Repository you are updating and whose Local Object Repositories contain objects. 8. In the Update from Local Repository dialog, select the desired action. 9. Repeat steps 6 through 8 as needed. 10. Click <Update All>.

Note: If the test using the Shared and Local Repositories is currently open, you may receive an error similar to the following: “You cannot update this shared object repository from the <path> test‟s local object repository because the test is currently locked by „<username> on machine „<machine name>‟. Wait for the test to be unlocked and then try to perform the update operation for this test again. If so, open a new test in QuickTest Professional to release (unlock) the test and repeat step 10. 11. Perform any steps needed to resolve conflicts. 12. If you are performing multiple merges, go to File -> Save and Merge Next to perform the next merge (the Local Object Repository of the next action being merged into the Shared Object Repository). 13. Click <Yes> to save your changes between merges. If you click <No>, the current merge (objects merged from the last action) will not be saved. 14. Repeat steps 11 through 13 to complete the multiple merges. 15. Choose File -> Exit, then click <Yes> to save the updated Object Repository. Merging shared object repositories: 1. Open the Object Repository Manager. 2. Go to Tools -> Object Repository Merge Tool. 3. In the New Merge window, browse to the primary repository file. Mercury recommends selecting the repository file you have invested the most time into as the primary repository file. 4. Select the secondary repository file. 5. Click <OK>. 6. Review the merge statistics, as described in Viewing Merge Statistics, and click <Close>. 7. Resolve any merge conflicts that were reported. Resolving object conflicts: Conflicts between objects in the primary and secondary object repositories are resolved automatically by the Object Repository Merge Tool using default resolution settings. For information on defining the default settings, refer to the QuickTest Professional User‟s Guide (Help -> QuickTest Professional Help -> QuickTest Professional User‟s Guide -> Managing and Merging Object Repositories -> Merging Shared Object Repositories -> Defining Default Settings). The Object Repository Merge Tool also allows you to change the way the merge was performed for each individual object that causes a conflict. 1. In the object repository tree, select an object that has a conflict (there will be an icon to the left of the object name). The conflicting objects are highlighted in the source

repositories. A description of the conflict and the resolution method used by the Object Repository Merge Tool is described in the Resolution Options pane. 2. In the Resolution Options pane, select a radio button to choose a resolution method. The target object repository is updated according to your selection and redisplayed. Note: The resolution method the Merge Tool used is selected by default. 3. Click <Previous Conflict> or <Next Conflict> to jump directly to the next or previous conflict in the target object repository hierarchy. 4. Repeat steps 1 through 3, as needed. 5. Save the merged object repository file Posted in Object | No Comments »

What is the QuickTest Automation Object Model and how is it used?
September 4, 2007 by Amit

You can use the QuickTest Professional Automation Object Model to write programs that automate your QuickTest operations. The QuickTest Automation Object Model provides objects, methods, and properties that enable you to control QuickTest from another application.The new QuickTest Professional Automation Object Model enables you to automate test management. You can now control virtually every QuickTest feature and capability using the objects, methods and properties included in the QuickTest Professional Automation Object Model. Automation scripts make it easy to perform any QuickTest operation multiple times in multiple tests without having to open the QuickTest application, for example,


 



You can write a script that modifies the test object description properties in the Object Identification dialog box and performs an update run on all tests in a specified file folder. After installing a new add-in, an automation script can associate this add-in to all relevant tests. You can write an automation script to run a selected batch of tests. For each test, you can retrieve the associated add-ins list. Then, if the necessary add-ins are not already loaded, you can close QuickTest, load the necessary add-ins, reopen QuickTest, and run the test. You can define your settings for a test in QuickTest, then click “Generate Script” in the Generate tab of the Test Settings dialog box to generate an automation script based on the current test settings. You can then apply those same settings automatically to multiple tests using the whole automation script or excerpts from the generated file.

Example: You can create and run an automation program from Microsoft Visual Basic that loads the required add-ins for a test, starts QuickTest in visible or minimized mode, opens the test, configures settings that correspond to those in the Options, Test Settings, and Record and Run Settings dialog boxes, runs the test, and saves the test. Creating automation programs: The Properties tab of the Test Settings dialog box, the General tab of the Options dialog box, and the Object Identification dialog box each contain a “Generate Script” button. Clicking this button generates a automation script file (.vbs) containing the current settings from the corresponding dialog box. You can run the generated script as is to open QuickTest with the exact configuration of the QuickTest application that generated the script, or you can copy and paste selected lines from the generated files into your own automation script. Generating an automation script for QuickTest Professional options: 1. Go to Tools -> Options. 2. Select the General tab. 3. Click <Generate Script>. 4. Save the script to the desired location. 5. Click <OK> to close the Options dialog. Generating an automation script for test settings: 1. Go to Test -> Settings. 2. Select the Properties tab. 3. Click <Generate Script>. 4. Save the script to the desired location. 5. Click <OK> to close the Test Settings dialog. Generating an automation script for object identification settings: 1. Go to Tools -> Object Identification. 2. Click <Generate Script>. 3. Save the script to the desired location. 4. Click <OK> to close the Object Identification dialog. The QuickTest Automation Object Model Reference file is a help file that provides detailed descriptions, syntax information, and examples for the objects, methods, and properties in the QuickTest Automation Object Model. Posted in Object | 1 Comment »

Use an Automation Object Model to load the Shared Object Repository?
September 4, 2007 by Amit

QuickTest Professional 9.0 QuickTest Professional 9.0 does not support dynamically loading object repositories at runtime. AOM statements are not designed to be executed from within a test script. QuickTest Professional 9.0 does allow you to associate and load (not at runtime) multiple Object Repository files. QuickTest Professional 8.2 and below Use the Automation Object Model to specify the path to a Shared Object Repository: Dim App „As Application Set App = CreateObject(”QuickTest.Application”) App.Test.Settings.Resources.ObjectRepositoryPath = “<PathToYourSharedRepositoryTsrFileHere>” Note: Be sure to replace <PathToYourSharedRepositoryTsrFileHere> with the path to the repository you want to use. Now the test will load and use the specified Shared Object Repository. Note: You may be able to execute the AOM statements from within a script, however they are not intended to be used this way. Whenever possible, check your conditions and modify the settings in an external .vbs file before the test execution begins. Posted in Object | No Comments »

How to associate Shared Object Repositories to the test (QTP 9.0)?
September 4, 2007 by Amit

With QuickTest Professional 9.0, you can associate multiple Shared Object Repositories with each action. Each action will always be associated with a Local Object Repository and can also be associated with one or more Shared Object Repositories. Note: All Shared Object Repositories are associated at the action level, not the test level, in QuickTest Professional 9.0. If you open a test that was created with an earlier version of QuickTest Professional, the Shared Object Repository will be associated with all of the test‟s actions automatically. Associating Shared Object Repositories with an action: 1. Right-click on the action, and select “Action Properties.” 2. Select the Associated Repositories.

3. Click the “Adds a new shared object repository file to the list” button (with the + icon). 4. Browse to and select the desired Shared Object Repository. 5. Repeat steps 3 and 4, as needed. 6. If needed, move the selected repository files up and down in the list using the arrow buttons. Associating Shared Object Repositories with multiple actions in one script: 1. Go to Resources -> Associate Repositories. 2. In the Associate Repositories dialog, click the “Add Repository” button (with the + icon). 3. Browse to and select the desired Shared Object Repository file. 4. Repeat steps 2 and 3 as needed for all Shared Object Repository files. 5. Select one of the repository files. 6. In the Available Actions list, select the actions the Shared Object Repository should be associated with. 7. Click the “>” button. The selected actions will move to the Associated Actions list. If you want to associate the file to all actions, click the “>>” button. 8. Repeat steps 5 through 7 for all repository files in the list. 9. Click <OK>. Associating Shared Object Repositories with all new actions: 1. Right-click on the action, and select “Action Properties.” 2. Select the Associated Repositories. 3. Click the “Adds a new shared object repository file to the list” button (with the + icon). 4. Browse to and select the desired Shared Object Repository. 5. Repeat steps 3 and 4, as needed. 6. If needed, move the selected repository files up and down in the list using the arrow buttons. 7. Click <Set as Default>. 8. Click <OK>. Note: Any new action created after this option has been set will use the specified Shared Object Repository files by default. To modify existing scripts, you will need to use one of the first two options. Posted in Object | 2 Comments »

How to set the Shared Object Repository option for a test ?
September 4, 2007 by Amit

To set only one test to use the Shared Object Repository option: 1. Click the “New” button or go to File -> New to open a new test. 2. Go to Test -> Settings.

3. Select the Resources tab. 4. In the Object repository type box, select one of the options:
 

Select “Per-action” to set the Object Repository mode for your test to the Object Repository per action mode. Select “Shared” to set the Object Repository mode for your test to the Shared Object Repository mode.

5. If you selected Shared in step 4, specify the Shared Object Repository file you want to use as the test‟s Object Repository file. To specify a file, enter the Object Repository file name or click the “Browse” button and select a resource file (*.tsr) from the Open dialog box. To create a new Shared Object Repository file, enter a new file name in the Shared box.Note: These steps need to be done in a new script. Once you have modified the script, you will not be able to change the option. To set all new scripts to use a Shared Object Repository: For QuickTest Professional 6.5 and above 1. Click the New button or go to File -> New to open a new test. 2. Go to Test -> Settings. 3. Select the Resources tab. 4. Select the Shared option for the “Object-repository type”. 5. Specify the Shared Object Repository file you want to use as the test‟s Object Repository file. To specify a file, enter the Object Repository file name or click the ellipse button <…> and select a resource file (*.tsr) from the Open dialog box. To create a new Shared Object Repository file, enter a new file name and path in the Shared box. 6. Click the “Set as Default” button. 7. Click <Apply> and <OK>. For previous versions of QuickTest Professional: 1. Click the New button or go to File -> New to open a new test. 2. Go to Tools -> Options. 3. Select the Resources tab. 4. Select the Shared option for the “Default object repository type.” 5. Specify the Shared Object Repository file you want to use as the test‟s Object Repository file. To specify a file, enter the Object Repository file name or click the “Browse” button and select a resource file (*.tsr) from the Open dialog box. To create a new Shared Object Repository file, enter a new file name in the Shared box. 6. Click <Apply> and <OK>. Note: Any new script created after this option has been set will use the Shared Object Repository by default. Posted in Object | No Comments »

What are the new features of the QTP 9.0 Object Repository?
August 29, 2007 by Amit

Features and functionality of the QTP 9.0 Object Repository With the QTP 9.0 Object Repository, you can: 1. Associate multiple repositories with an action. 2. Use both a Local and Shared Object Repositories with an action. Note: If both the Local and Shared Object Repository files contain the same object, QuickTest Professional will use the object in the Local Repository. 3. Add objects from the Local Repository to an associated Shared Repository. 4. Manually create objects in the repository. 5. Specify different Shared Object Repository files with each action in a test. 6. Merge Object Repository files. 7. Import/export the Object Repository file into an XML file. 8. Move objects from one parent to another. For more information on the Object Repository, refer to the QuickTest Professional User‟s Guide (Help -> QuickTest Professional Help -> QuickTest User‟s Guide -> Managing and Merging Object Repositories. Posted in Object | 1 Comment »

What is Smart Identification?
August 28, 2007 by Amit Smart Identification is used to locate objects that may have changed When the recorded definition for an object does not enable QuickTest to identify an option, QuickTest uses the Smart Identification definition (if defined and enabled) to identify the object. When QuickTest uses the recorded description to identify an object, it searches for an object that matches every one of the property values in the description. In most cases, this description is the simplest way to identify the object and unless the main properties of the object change, this method will work.

If QuickTest is unable to find any object that matches the recorded object description, or if it finds more than one object that fits the description, then QuickTest ignores the recorded description, and uses the Smart Identification mechanism to try to identify the object. While the Smart Identification mechanism is more complex, it is more flexible, and thus, if configured logically, a Smart Identification definition can probably help QuickTest identify an object, if it is present, even when the recorded description fails. The Smart Identification mechanism uses two types of properties: Base filter properties: The most fundamental properties of a particular test object class; those whose values cannot be changed without changing the essence of the original object. For example, if a Web link‟s tag was changed from <A> to any other value, you could no longer call it the same object. Optional filter properties: Other properties that can help identify objects of a particular class as they are unlikely to change on a regular basis, but which can be ignored if they are no longer applicable. If QuickTest activates the Smart Identification mechanism during a test run (because it was unable to identify an object based on its recorded description), it follows the following process to identify the object: 1. QuickTest forgets the recorded test object description and creates a new object candidate list containing the objects (within the object‟s parent object) that match all of the properties defined in the base filter property list. 2. From that list of objects, QuickTest filters out any object that does not match the first property listed in the Optional Filter Properties list. The remaining objects become the new object candidate list. 3. QuickTest evaluates the new object candidate list: If the new object candidate list still has more than one object, QuickTest uses the new (smaller) object candidate list to repeat step 2 for the next optional filter property in the list. If the new object candidate list is empty, QuickTest ignores this optional filter property, returns to the previous object candidate list, and repeats step 2 for the next optional filter property in the list. If the object candidate list contains exactly one object, then QuickTest concludes that it has identified the object and performs the statement containing the object. 4. QuickTest continues the process described in steps 2 and 3 until it either identifies one object or runs out of optional filter properties to use. If, after completing the Smart Identification elimination process, QuickTest still cannot identify the object, then QuickTest uses the recorded description plus the ordinal identifier to identify the object. If the combined recorded description and ordinal identifier are not sufficient to identify the object, then QuickTest stops the test run and displays a Run Error message.

1-72540913 Posted in Object | No Comments »

Difficulties in identifying dynamic objects
August 13, 2007 by Amit

Sometimes, the user has an object with a dynamic description (e.g., the name property is completely dynamic). Regular Expressions will not help in this case, since the whole name is changed between runs. Uniquely identifying dynamic objects When QuickTest Professional has difficulties identifying objects uniquely, you may need to change the properties used in the description of the object. There are two ways to do this: 1. Configure the properties that are used to identify the object class.Note: These changes will affect all objects of this class type.For QuickTest Professional 6.0 and above QuickTest Professional 6.0 added the Object Identification tool to allow you to configure the properties which are learned for object classes. 1. Go to Tools -> Object Identification. 2. Select the environment type (e.g., ActiveX or Java) for the problem object from the Environment combobox. 3. Select the object class in the Test Object classes list. The lists on the right side of the dialog will be populated with the current mandatory and assistive properties. 4. Click <Add/Remove> under the desired list. 5. Clear the checkbox next to the dynamic properties. 6. Select the checkbox next to the new properties you wish to use. 7. Click <OK>. 8. Click <OK> to close the Object Identification dialog. 9. Relearn the objects into the Object Repository. For detailed step by step instructions, please refer to the “Configuring Mandatory and Assistive Recording Properties” chapter in the User‟s guide. For Astra QuickTest/QuickTest Professional 5.6 or below 10. Open the registry editor (Start -> Run -> regedit.) 11. Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Mercury Interactive\QuickTest Professional\MicTest\Test Objects\<object>\Description where <object> is the class type of the problem object. Expand the Astra QuickTest folder if you are using Astra QuickTest. You will see a list of properties that are used to identify these objects.

12. Remove the dynamic property by right-clicking on the value and selecting Modify. Set the value data to zero. Repeat as needed. 13. Add a new property to identify the object. Go to Edit -> New -> DWORD Value. Enter the name of the property to be used. Right-click and select “Modify.” Set the value data to 58 Hexadecimal to make the property mandatory or 448 Hexadecimal to make the property additional (used if there are not enough mandatory properties to uniquely identify the object). Repeat as needed. 14. Close the registry. 15. Restart Astra QuickTest/QuickTest Professional. 16. Relearn the object into the Object Repository. You can find a list of available properties in the registry at HKEY_CURRENT_USER\Software\Mercury Interactive\Astra QuickTest\MicTest\Attributes (or QuickTest Professional if you are using QuickTest Professional). Note: The exact paths within the registry may differ slightly with different versions of the applications. Also, all the properties listed under the registry key may not be available for all objects. 2. Instruct QuickTest Professional to use different properties only for the problem object.Note: These changes will affect only the objects you modify but will not affect other objects of the same class type.QuickTest Professional 9.0 For information on modifying object property or property values in QuickTest Professional 9.0, QuickTest Professional 8.2 and below 1. Right-click on the object in the Keyword View (Tree View, in QuickTest Professional 6.5 and below). 2. Select Object Properties. 3. Click <Add/Remove> and clear the checkbox for the dynamic property. 4. Click <OK> to close the Add/Remove Properties and Object Properties dialogs. 5. Go to Tools -> Object Repository. 6. Select the problem object in the object repository tree. 7. Click <Add/Remove>. 8. Set the checkbox next to the properties you wish to use to uniquely identify the object.

QTP Question & Answers
Question: How will you check that your test cases covered all the requirements By using traceabiltymatrix. Traceability matrix means the matrix showing the relationship b/w the requirements & testcases

1. Question: When there is a task that gets repeated in multiple scripts, what do you do in QTP? Split the action related to that task, make it Reusable & then call that Action as many times as needed. 2 Question: what is the descriptive progrmaing?.what is the use of descriptive programming? QTP uses it's object repository to refer to objects present in your test and which have been recorded, if you wish to use objects that were not recorded and are not present in your object repository then we use descriptive programming, where QTP does not refer to object repository but the property name and value are mentioned in the code itself for QTP to use it for e.g this is not Desc. Prog. Browser("Mercury Tours").Page("Mercury Tours").WebEdit("username") This is desc prog. Browser("Title:=Mercury Tours").Page("Title:=Mercury Tours").WebEdit("Name:=Author", "Index:=3").Set "Mark Twain" 3. How to add run-time parameter to a datasheet? Datatable..addparameter , example, datatable.localsheet.addparameter "Col1","Column" 4. How to load the *.vbs or test generating script in a new machine? You can use the any one of the following two methods:1. goto : Tools --->settings --->Resources and add the .vbs file2. in the QTP script u can write : Dim App 'As ApplicationSet App = CreateObject("QuickTest.Application")App.LaunchApp.Test.Settings.Resources. Libraries.Add("") 5. How to instruct QTP to display errors and ther description in the test results instead of halting execution by throwing error in the mid of execution due to an error(for example Object not found)? Use Exception Handling (Recovery Scenario Manager) technique of QTP: can be achieved by any one of the following two methods: 1. Using Recovery Scenario Manager2. Scripting by using: if-else-then OR Select Case 6. how to fetch test data from Database by using QTP? In order to fetch test data from Database we have to create a adobdb connection object to connect with data base. the syntax is .... >CreateObject("Adodb.connection"). 7. Question: how many types of recording modes in QTP?describe each type with an example where we use them? There are three types of recording modes available in Quickest Pro.1.Normal mode2.Analog mode3.Low-level recording mode Normal mode: This is the default mode of recording in QTP ,Object and the Operation

associated/performed with Object can be recorded. This mode takes full advantage of Quick Test's test object model, recognizing the objects in AUT regardless of their location on the screen. Analog mode: This mode records exact mouse and keyboard operations you perform in relation to the screen / application window. This mode is useful for the operation which you can record at object level, such as drawing a picture, recording signature the steps recoded using Analog mode are saved in separate data-file, Quick tests adds to your test a Run Analog file statement that calls the recorded Analog file. This file is stored with your action in which these Analog steps are created The steps recorded in Analog mode can not be edited within Quick Test. Low-level recording mode enables you to record any object or operation in your AUT whether or not Quick Test recognizes the it. This Low-level recording is useful when the exact location of an Object/operation in your AUT is important for your test .This mode records in terms of X,Y co-ordinates .Unlike in Analog mode ,the steps can be seen in Test script, a s well in Keyword view. 8. What is the file extension of the code file & object repository file in QTP? for object repository file the extension is .tsr for code file the extension is .vbs 9. Question: How many types of Actions are there in QTP? QTP structured by actions.actions are subprocedures which perform certain actions on application under test. there are 2 types of actions regular actions(non reusable actions) reusable actions regular actions:regular actions are used only in the script in which they were genarated.and only once.regular actions are like winrunner script. reusable actions:actions that can be called by other actions.either(regular or reusable). we have two types of reusable actions external reusable actions internal reusable actions external reusable actions:these actions were created in another test as internal actions .and called by the given test. internal reusable actions:these actions were created and used in the given test with in the local scope. 10. Question: Explain the concept of object repository & how QTP recognises objects? Object Repository: displays a tree of all objects in the current component or in the current action or entire test( depending on the object repository mode you selected). we can view or modify the test object description of any test object in the repository or to add new objects to the repository. Quicktest learns the default property values and determines in which test object class it fits.If it is not enough it adds assistive properties, one by one to the description until it has compiled the unique description.If no assistive properties are available, then it adds a special Ordianl identifier such as objects location onthe page or in the source code.

11. Question: How do you data drive an external spreadsheet? Import from External Spreadsheet File by selecting Import then From File . Which imports a tabbed text file or a single sheet from an existing Microsoft Excel file into the table. The sheet you import replaces all data in the currently selected sheet of the table, and the first row in the Excel sheet replaces the column headers in the corresponding Data Table sheet. It is therefore essential that the first row of your Microsoft Excel sheet exactly matches the parameter names in your test. If it is a Database instead of Spreadsheet by selecting Import then From Database. It imports data from the specified database to the current sheet 12. Question: How to handle dynamic objects in QTP? QTP has a unique feature called Smart Object Identification/recognition. QTP generally identifies an object by matching its test object and run time object properties. QTP may fail to recognise the dynamic objects whose properties change during run time. Hence it has an option of enabling Smart Identification, wherein it can identify the objects even if their properties changes during run time. Check this out- If QuickTest is unable to find any object that matches the recorded object description, or if it finds more than one object that fits the description, then QuickTest ignores the recorded description, and uses the Smart Identification mechanism to try to identify the object. While the Smart Identification mechanism is more complex, it is more flexible, and thus, if configured logically, a Smart Identification definition can probably help QuickTest identify an object, if it is present, even when the recorded description fails. The Smart Identification mechanism uses two types of properties: Base filter properties—The most fundamental properties of a particular test object class; those whose values cannot be changed without changing the essence of the original object. For example, if a Web link's tag was changed from to any other value, you could no longer call it the same object. Optional filter properties— Other properties that can help identify objects of a particular class as they are unlikely to change on a regular basis, but which can be ignored if they are no longer applicable. 13. Question: How to handle the exceptions using recovery secnario manager in Qtp? You can instruct QTP to recover unexpected events or errors that occured in your testing environment during test run. Recovery scenario manager provides a wizard that guides you through the defining recovery scenario. Recovery scenario has three steps 1. Triggered Events 2. Recovery steps 3. Post Recovery Test-Run There are 4 trigger events during which a recovery scenario should be activated. They are A pop up window appears in an opened application during the test run. A property of an object changes its state or value. A step in the test does not run successfully. An open application fails during the test run. These triggers are considered as exceptions and more details regarding how to use Recovery Manager is given in the QTP User Guide. Since there is hardly any space to put up snapshots.

14. What are the Features & Benefits of Quick Test Pro(QTP)..? Operates stand-alone, or integrated into Mercury Business Process Testing and Mercury Quality Center. Introduces next-generation “zero-configuration” Keyword Driven testing technology in QuickTest Professional 8.0 — allowing for fast test creation, easier maintenance, and more powerful data-driving capability Identifies objects with Unique Smart Object Recognition, even if they change from build to build, enabling reliable unattended script execution Collapses test documentation and test creation to a single step with Auto-documentation technology Enables thorough validation of applications through a full complement of checkpoints 1. Key word driven testing 2. Suitable for both client server and web based application 3. Vb script as the scriot language 4. Better error handling mechanism 5. Excellent data driven testing features QTp has got so many benefits compared to Winrunner.It enables evn an inexperienced tester to work with as it is GUI based.Major advantages it has are active screen which allows user to insert cheskpoints when the application is closed,testers job is made simple with different features it has,debug viewer where in we can see wht values variables carry when the test is running,and many features made simple 15. Question: Explain in brief about the QTP Automation Object Model. Essentially all configuration and run functionality provided via the QuickTest interface is in some way represented in the QuickTest automation object model via objects, methods, and properties. Although a one-on-one comparison cannot always be made, most dialog boxes in QuickTest have a corresponding automation object, most options in dialog boxes can be set and/or retrieved using the corresponding object property, and most menu commands and other operations have corresponding automation methods. You can use the objects, methods, and properties exposed by the QuickTest automation object model, along with standard programming elements such as loops and conditional statements to design your program 16. Question: What is a Run-Time Data Table? Where can I find and view this table? The test results tree also includes the table-shaped icon that displays the runtime Data Table—a table that shows the values used to run a test containing Data Table parameters or the Data Table output values retrieved from a test while application test run. 17. Question: What are the different scripting languages you could use when working with QTP ? 1. VBScript 2. Jscript 18. Question: How do you test siebel application using qtp? This answer is relevant to Siebel 7.7, and QTP 8.0. To test Siebel using QTP, you will need two components.

1. The Siebel Addin from Mercury for QTP (install this on the system with QTP on it). 2. The Test Automation Framework license keys from Siebel (install the license key on the Siebel server). Now you will need to enable the automation API on the Siebel server. To do this, The [SWE] section of the server .cfg file needs to be updated with the entries below [SWE] ... EnableAutomation = TRUE AllowAnonUsers = TRUE ... The Siebel server needs to be restarted after this change. You can now test Siebel from QTP by using the Siebel Addin. 19. Question: What is the difference between check point and output value. Check point is a verification point that compares a current value for a specified property with the expected value for that property. An outPut value is a value captured during the test run and entered in the run-time table which can be used as an input for another statement. 20. Question: What are the properties you would use for identifying a browser & page when using descriptive programming ? "name" would be another property apart from "title" that we can use. ex: Browser("name:="xxx"").page("name:="xxxx"")..... OR We can also use the property "micClass". ex: Browser("micClass:=browser").page("micClass:=page").... 21. Question: Differentiate the two Object Repository Types of QTP. In Qtp there are 2 object repositories, they are1.Shared Object Repository2.Per Action Mode,by default it's per action mode.we will use shared OR for calling a particular action,it's like calling external libraries.we will use per action for a particular action ie, for one action only. 22. Question: Explain the concept of how QTP identifies object. QTP uses the Object Repository file to recognize objects on the application. When QTP runs a action, it uses the Object Repository to locate objects. It reads an object’s description in the Object Repository and then looks for an object with the same properties in the application being tested During recording qtp looks at the object and stores it as test object.For each test object QT learns a set of default properties called mandatory properties,and look at the rest of the objects to check whether this properties are enough to uniquely identify the object. During test run,QT searches for the run time obkects that matches with the test object it learned while recording. 23. Question: What is the difference between Call to Action and Copy Action.?

Call to Action : The changes made in Call to Action , will be reflected in the orginal action( from where the script is called).But where as in Copy Action , the changes made in the script ,will not effect the original script(Action) when u insert a call to action,they r read only in the calling test.It can be modified in the original test.where as come to copy action,you can make changes to the copied action,your changes will not effect the original action where it created. 24. Question: Explain the keyword createobject with an example. Creates and returns a reference to an Automation object syntax: CreateObject(servername.typename [, location]) Arguments servername:Required. The name of the application providing the object. typename : Required. The type or class of the object to create. location : Optional. The name of the network server where the object is to be created. create object creates handle to the instance of the specified object so that we program can use the methods on the specified object. It is used for implementing Automation(as defined by microsoft). ex: set oDesc= createobject(Excel.application) odesc.activeworksheet=1 25. To which environments does QTP supports ? QuickTest Professional supports functional testing of all enterprise environments, including Windows, Web, ..NET, Java/J2EE, SAP, Siebel, Oracle, PeopleSoft, Visual Basic, ActiveX, mainframe terminal emulators, and Web services. 26. Explain QTP Testing process ? The QuickTest testing process consists of 6 main phases: Create your test plan Prior to automating there should be a detailed description of the test including the exact steps to follow, data to be input, and all items to be verified by the test. The verification information should include both data validations and existence or state verifications of objects in the application. Recording a session on your application As you navigate through your application, QuickTest graphically displays each step you perform in the form of a collapsible icon-based test tree. A step is any user action that causes or makes a change in your site, such as clicking a link or image, or entering data in a form. Enhancing your test Inserting checkpoints into your test lets you search for a specific value of a page, object or text string, which helps you identify whether or not your application is functioning correctly. NOTE: Checkpoints can be added to a test as you record it or after the fact via the Active Screen. It is much easier and faster to add the checkpoints during the recording process. Broadening the scope of your test by replacing fixed values with parameters lets you check how your application performs the same operations with multiple sets of data. Adding logic and conditional statements to your test enables you to add sophisticated checks to your test. Debugging your test If changes were made to the script, you need to debug it to check that it operates smoothly and without interruption. Running your test on a new version of your application You run a test to check the behavior of your application. While running, QuickTest connects to your application and performs each step in your test. Analyzing the test results You examine the test results to pinpoint defects in your application. Reporting defects As you encounter failures in the application when analyzing test results, you will

create defect reports in Defect Reporting Tool. 27. Explain the check points in QTP? A checkpoint verifies that expected information is displayed in a Application while the test is running. You can add eight types of checkpoints to your test for standard web objects using QTP. A page checkpoint checks the characteristics of a Application A text checkpoint checks that a text string is displayed in the appropriate place on a Application. An object checkpoint (Standard) checks the values of an object on a Application. An image checkpoint checks the values of an image on a Application. A table checkpoint checks information within a table on a Application An Accessiblity checkpoint checks the web page for Section 508 compliance. An XML checkpoint checks the contents of individual XML data files or XML documents that are part of your Web application. A database checkpoint checks the contents of databases accessed by your web site 28. What is Parameterizing Tests? When you test your application, you may want to check how it performs the same operations with multiple sets of data. For example, suppose you want to check how your application responds to ten separate sets of data. You could record ten separate tests, each with its own set of data. Alternatively, you can create a parameterized test that runs ten times: each time the test runs, it uses a different set of data.


								
To top