1.What is QTP?
Quick test pro is used to automate user actions (like mouse clicks and keyboard actions) of an application. This is provided by a GUI. It is used to specifically automate functional and regression testing. A number of plug-ins is available in QTP for enhancing the environment.
2.What are the Environment Variables?
Environment variables are global variables available to all Actions
# They can be used to run a test case on different environment
# To add a new Environment variable go to Test -> Settings…->Environment (Tab)
# Environment variables are of two types like:
1. Built in Environment Variables: These provide Information about the system and thecurrent test
2. User-Defined Environment Variables: These are added in the Environment tab of Test Settings. These are Read-only during the test run
Environment variables are global variables available to all Actions
# They can be used to run a test case on different environment
# To add a new Environment variable go to Test -> Settings…->Environment (Tab)
# Environment variables are of two types like:
1. Built in Environment Variables: These provide Information about the system and thecurrent test
2. User-Defined Environment Variables: These are added in the Environment tab of Test Settings. These are Read-only during the test run
3.How many types of Parameters are there in QTP?
There are two types of parameters like: Test parameters:
# These can be set in Test->Settings…->Parameters (Tab)
# Test parameters value can be provided when replaying the test
# Test arguments can be accessed in the test using TestArgs(“”)
Action parameters :
# Used to pass parameters to Action
# Output parameters can only be used when Action is being called for a single iteration
# Ex – RunAction “Login”, oneIteration, “TestUser”, “TestPass”, out
# A parameter can be accessed using Parameter(“ParamName”).
There are two types of parameters like: Test parameters:
# These can be set in Test->Settings…->Parameters (Tab)
# Test parameters value can be provided when replaying the test
# Test arguments can be accessed in the test using TestArgs(“”)
Action parameters :
# Used to pass parameters to Action
# Output parameters can only be used when Action is being called for a single iteration
# Ex – RunAction “Login”, oneIteration, “TestUser”, “TestPass”, out
# A parameter can be accessed using Parameter(“ParamName”).
4.What is Descriptive Programming?
Descriptive Programming is an alternate way of writing test cases without having objects in object repository Descriptive programming can be done in two ways
1. Using Object Description
2. Using String Description
In Descriptive Programming objects are identified by describing all the identification properties.
Descriptive Programming is an alternate way of writing test cases without having objects in object repository Descriptive programming can be done in two ways
1. Using Object Description
2. Using String Description
In Descriptive Programming objects are identified by describing all the identification properties.
5.After creating the test, what is the purpose of running them?
1) To Check the Application: The test starts running from the first line in our test and stops at the end of the test. While running, QTP connects to our application and performs each operation in our test, including any checkpoints, such as checking any text strings, objects, tables, and so forth. If we had parameterized our test with Data Table parameters,QTP repeats the test (or specific actions in your test) for each set of data values we had defined.
2) To Debug the Application: We can control our run session to help us identify and eliminate defects in our test. We can use the Step Into, Step Over, and Step Out commands to run our test step by step. We can begin our run session from a specific step in our test, or run the test until a specific step is reached. We can also set breakpoints to pause our test at predetermined points. We can view the value of variables in our test each time it stops at a breakpoint in the Debug Viewer.
3)To Update the Application: We can run our test using Update Run Mode to update the property sets used for test object descriptions, the expected checkpoint values, the data available to retrieve in output values, and the Active Screen images and values. We can run our test using Maintenance Run Mode when we know that our application has changed, and we therefore expect that QTP will not be able to identify the objects in our test. When we run tests in Maintenance Run Mode, a wizard opens for steps that fail because an object could not be found in the application. The wizard then guides us through the steps of resolving the issue, and, after we resolve the issue, the run continues.
1) To Check the Application: The test starts running from the first line in our test and stops at the end of the test. While running, QTP connects to our application and performs each operation in our test, including any checkpoints, such as checking any text strings, objects, tables, and so forth. If we had parameterized our test with Data Table parameters,QTP repeats the test (or specific actions in your test) for each set of data values we had defined.
2) To Debug the Application: We can control our run session to help us identify and eliminate defects in our test. We can use the Step Into, Step Over, and Step Out commands to run our test step by step. We can begin our run session from a specific step in our test, or run the test until a specific step is reached. We can also set breakpoints to pause our test at predetermined points. We can view the value of variables in our test each time it stops at a breakpoint in the Debug Viewer.
3)To Update the Application: We can run our test using Update Run Mode to update the property sets used for test object descriptions, the expected checkpoint values, the data available to retrieve in output values, and the Active Screen images and values. We can run our test using Maintenance Run Mode when we know that our application has changed, and we therefore expect that QTP will not be able to identify the objects in our test. When we run tests in Maintenance Run Mode, a wizard opens for steps that fail because an object could not be found in the application. The wizard then guides us through the steps of resolving the issue, and, after we resolve the issue, the run continues.
6.What are the main stages of Testing with QTP?
Testing with QTP involves main stages like:
Testing with QTP involves main stages like:
- Planning
- Creating Tests
- Running Tests
- Analysing Results
7.How can we do the Analysis of Results in QTP?
After we run our test, we can view the results.
# View the results in the Test Results window: After we run our test, we can view the results of the run in the Test Results window. We can view a summary of our results as well as a detailed report. If we had captured still images or movies of our application during the run, we can view these from the Test Results window.
# Report defects detected during a run session: If we have access to Quality Center, the HP centralized quality solution, we can report the defects we discover to the project database. We can instruct QTP to automatically report each failed step in our test, or we can report them manually from the Test Results window.
After we run our test, we can view the results.
# View the results in the Test Results window: After we run our test, we can view the results of the run in the Test Results window. We can view a summary of our results as well as a detailed report. If we had captured still images or movies of our application during the run, we can view these from the Test Results window.
# Report defects detected during a run session: If we have access to Quality Center, the HP centralized quality solution, we can report the defects we discover to the project database. We can instruct QTP to automatically report each failed step in our test, or we can report them manually from the Test Results window.
8.What is Business Process Testing?
# Business Process Testing is a role-based testing model that enables Subject Matter Experts—who understand the various parts of the application being tested—to create business process tests in Quality Center. Automation Engineers—who are experts in QTP and automated testing—use QTP to define all of the resources and settings required to create business process tests.
# Business Process Testing uses a keyword-driven methodology for testing, based on the creation and implementation of business components and business process tests. A business component is an easily maintained, reusable unit comprising one or more steps that perform a specific task within an application.
# Business Process Testing is a role-based testing model that enables Subject Matter Experts—who understand the various parts of the application being tested—to create business process tests in Quality Center. Automation Engineers—who are experts in QTP and automated testing—use QTP to define all of the resources and settings required to create business process tests.
# Business Process Testing uses a keyword-driven methodology for testing, based on the creation and implementation of business components and business process tests. A business component is an easily maintained, reusable unit comprising one or more steps that perform a specific task within an application.
9.What are Permissions Required to Run QTP?
Following file system permissions are required:
1) Full read and write permissions for all the files and folders under the folder in which QTP is installed
2) Full read and write permissions to the Temp folder
3) Read permissions to the Windows folder and to the System folder
We must have the following registry key permissions:
1) Full read and write permissions to all the keys under HKEY_CURRENT_USER\Software\Mercury Interactive
2) Read and Query Value permissions to all the HKEY_LOCAL_MACHINE and HKEY_CLASSES_ROOT keys.
Following file system permissions are required:
1) Full read and write permissions for all the files and folders under the folder in which QTP is installed
2) Full read and write permissions to the Temp folder
3) Read permissions to the Windows folder and to the System folder
We must have the following registry key permissions:
1) Full read and write permissions to all the keys under HKEY_CURRENT_USER\Software\Mercury Interactive
2) Read and Query Value permissions to all the HKEY_LOCAL_MACHINE and HKEY_CLASSES_ROOT keys.
10.What is the role of Keyword View in QTP?
- The Keyword View enables us to create and view the steps of our test in a keyword-driven ,modular, table format. The Keyword View is comprised of a table-like view, in which each step is a separate row in the table, and each column represents different parts of the steps. We can modify the columns displayed to suit our requirements.
- We create and modify tests by selecting items and operations in the Keyword View and entering information as required. Each step is automatically documented as we complete it, enabling us to view a description of our test steps in understandable English.
- Each operation performed on our application during a recording session is recorded as a row in the Keyword View.
11.What is the role of Expert View in QTP?
In the Expert View, QTP displays each operation performed on our application in the form of a script, comprised of VBScript statements. The Expert View is a script editor with many script editing capabilities. For each object and method in an Expert View statement, a corresponding row exists in the Keyword View.
In the Expert View, QTP displays each operation performed on our application in the form of a script, comprised of VBScript statements. The Expert View is a script editor with many script editing capabilities. For each object and method in an Expert View statement, a corresponding row exists in the Keyword View.
12.What are the various utilities and tools available in QTP?
Tools Menu contains the following utilities and tools which are helpful in the testing process:
# Action Conversion Tool: Enables us to convert test actions that were created using QTP to scripted components for use in business process testing.
# Additional Installation Requirements: Opens the Additional Installation Requirements dialog box, which displays any prerequisite software that we must install or configure to work with QTP.
# Business Component Upgrade Tool: Opens the Business Component Upgrade Tool. If we are connected to a Quality Center project, this tool enables us to upgrade all of the business components in a Quality Center project, from an earlier component version to the format required by the current version.
# HP Micro Player: Opens the HP Micro Player, which enables us to view captured movies of a run session without opening QuickTest.
# License Validation Utility: Opens the License Validation utility, which enables us to retrieve and validate license information.
# Password Encoder: Opens the Password Encoder dialog box, which enables us to encode passwords. We can use the resulting strings as method arguments or Data Table parameter values (tests only).
# QTP Script Editor: Opens the QTP Script Editor, which enables us to open and modify the scripts of multiple tests and function libraries, simultaneously.
# Register New Browser Control: Opens the Register Browser Control Utility, which enables us to register our browser control application so that QTP recognizes our Web object when recording or running tests.
# Remote Agent: Activates the QuickTest Remote Agent, which enables us to configure how QTP behaves when a test is run by a remote application such as Quality Center.
# Save and Restore Settings: Opens the Save and Restore Settings dialog box, which enables us to save our existing configurations before uninstalling an old version, and then restore them after installing a new version.
# Silent Test Runner: Opens the Silent Test Runner dialog box, which enables us to run a QTP test the way it is run from LoadRunner and Business Availability Center.
# Test Batch Runner: Opens the Test Batch Runner dialog box, which enables us to set up QTP to run several tests in succession.
# Test Results Deletion Tool: Opens the Test Results Deletion Tool dialog box, which enables us to delete unwanted or obsolete results from our system according to specific criteria that you define.
Tools Menu contains the following utilities and tools which are helpful in the testing process:
# Action Conversion Tool: Enables us to convert test actions that were created using QTP to scripted components for use in business process testing.
# Additional Installation Requirements: Opens the Additional Installation Requirements dialog box, which displays any prerequisite software that we must install or configure to work with QTP.
# Business Component Upgrade Tool: Opens the Business Component Upgrade Tool. If we are connected to a Quality Center project, this tool enables us to upgrade all of the business components in a Quality Center project, from an earlier component version to the format required by the current version.
# HP Micro Player: Opens the HP Micro Player, which enables us to view captured movies of a run session without opening QuickTest.
# License Validation Utility: Opens the License Validation utility, which enables us to retrieve and validate license information.
# Password Encoder: Opens the Password Encoder dialog box, which enables us to encode passwords. We can use the resulting strings as method arguments or Data Table parameter values (tests only).
# QTP Script Editor: Opens the QTP Script Editor, which enables us to open and modify the scripts of multiple tests and function libraries, simultaneously.
# Register New Browser Control: Opens the Register Browser Control Utility, which enables us to register our browser control application so that QTP recognizes our Web object when recording or running tests.
# Remote Agent: Activates the QuickTest Remote Agent, which enables us to configure how QTP behaves when a test is run by a remote application such as Quality Center.
# Save and Restore Settings: Opens the Save and Restore Settings dialog box, which enables us to save our existing configurations before uninstalling an old version, and then restore them after installing a new version.
# Silent Test Runner: Opens the Silent Test Runner dialog box, which enables us to run a QTP test the way it is run from LoadRunner and Business Availability Center.
# Test Batch Runner: Opens the Test Batch Runner dialog box, which enables us to set up QTP to run several tests in succession.
# Test Results Deletion Tool: Opens the Test Results Deletion Tool dialog box, which enables us to delete unwanted or obsolete results from our system according to specific criteria that you define.
13.What is the concept of Test Object Model in QTP?
- QTP tests our dynamically changing application by learning and identifying test objects and their expected properties and values. To do this, QTP analyzes each object in our application in much the same way that a person would look at a photograph and remember its details.
- The test object model is a large set of object types or classes that QTP uses to represent the objects in our application. Each test object class has a list of properties that can uniquely identify objects of that class and a set of relevant methods that Quick Test can learn about it.
- A test object is an object that QTP creates in the test to represent the actual object in your application. QTP stores information on the object that will help it identify and check the object during the run session.
- A run-time object is the actual object in our application on which methods are performed during the run session.
14.Please explain some real world scenario explaining Object Learning process of QTP?
- QTP learns objects just as we would. For example, suppose as part of an experiment, Bob is told that he will be shown a photograph of a picnic scene for a few seconds during which someone will point out one item in the picture. Bob is told that he will be expected to identify that item again in identical or similar pictures one week from today.
- Before he is shown the photograph, Bob begins preparing himself for the test by thinking about which characteristics he wants to learn about the item that the tester indicates.Obviously, he will automatically note whether it is a person, inanimate object, animal, or plant. Then, if it is a person, he will try to commit to memory the gender, skin color, and age. If it is an animal, he will try to remember the type of animal, its color, and so forth.
- The tester shows the scene to Bob and points out one of three children sitting on a picnic blanket. Bob notes that it is a Caucasian girl about 8 years old. In looking at the rest of the picture, however, he realizes that one of the other children in the picture could also fit that description. In addition to learning his planned list of characteristics, he also notes that the girl he is supposed to identify has long, brown hair.
- Now that only one person in the picture fits the characteristics he learned, he is fairly sure that he will be able to identify the girl again, even if the scene the tester shows him next week is slightly different.
- Since he still has a few moments left to look at the picture, he attempts to notice other,more subtle differences between the child he is supposed to remember and the others in the picture—just in case.
- If the two similar children in the picture appeared to be identical twins, Bob might also take note of some less permanent feature of the child, such as the child’s position on the picnic blanket. That would enable him to identify the child if he were shown another picture in which the children were sitting on the blanket in the same order.
15.What is the method used by QTP to learn objects?
- QTP “looks” at the object being learned and stores it as a test object, determining in which test object class it fits. In the same way, Bob immediately checked whether the item was a person, animal, plant, or inanimate object. QTP might classify the test object as a standard Windows dialog box, a Web button, or a Visual Basic scroll bar object, for example.
- Then, for each test object class, QTP has a list of mandatory properties that it always learns; similar to the list of characteristics that Bob planned to learn before seeing the picture. When QTP learns an object, it always learns these default property values, and then “looks” at the rest of the objects on the page, dialog box, or other parent object to check whether this description is enough to uniquely identify the object.
- If it is not, QTP adds assistive properties, one by one, to the description, until it has compiled a unique description; similar to when Bob added the hair length and color characteristics to his list. If no assistive properties are available, or if those available are not sufficient to create a unique description, QTP adds a special ordinal identifier, such as the object’s location on the page or in the source code, to create a unique description.
16.What is Test Object Method in QTP?
- It is a method that QTP recognizes as applicable to a particular test object. For example, the Click method is applicable to a WebButton test object. As we add steps to our test, we specify which method to perform on each test object. If we record steps, QTP records the relevant method as it is performed on an object.
- During a run session, QTP performs the specified test object method on the run-time object. Run-time object methods are the methods of the object in our application as defined by the object creator. We can access and perform run-time object methods using the Object
17.What are the Test Object Properties in QTP?
- Test object properties are the properties whose values are captured from the objects in our application when QTP learns the object. QTP uses the values of these properties to identify run-time objects in our application during a run session.
- Property values of objects in our application may change dynamically each time our application opens, or based on certain conditions. We may need to modify the test object property values to match the run-time object property values.
- We can modify test object properties manually while designing our test, or use SetTOProperty statements during a run
FabGreen Technologies,Madivala-
Fabgreentech.com/
FabGreenTechnologies.com
Fabgreentech.com/
FabGreenTechnologies.com
ReplyDeleteExcellent article!!! LoadRunner is popular automation testing tool used for validating a software application/system under load. It delivers most precise information about the performance, functionality and behavior of the software product.
hp loadrunner training in chennai
Loadrunner classes in Chennai