QTP Interview Questions
An Overview of QTP
Quick Test Professional or QTP is a tool developed by Hewlett Packard (HP) to perform automated functional testing without any monitoring required after the script development. This software tool uses VBScript or Visual Basic Scripting to automate all its applications. The Scripting Engine required by QTP doesn’t need any installation as it’s pre-available in Windows OS.
Here is a set of most used QTP interview questions for experienced as well as beginners to this niche selected by industry best recruiters.
The QTP tool supports various modern testing activities, starting from planning and creating a build to test execution, test analysis, and defect logging. As it’s one of the most business preferred testing tool available in the market, the demand of QTP professionals is also raising high. Further, in this content, we will discuss a set of most crucial QTP interview questions and answers for your acknowledgment.
Advantages of QTP
- Comes with a user-friendly interface. Even non-programmers can add test cases into it quickly.
- Contains advanced object identification mechanism and features to enhance existing tests without AUT through the active screen
- Has an inbuilt IDE, which is easy to use and simple with the interface.
- Easy and less time taking to maintain data and test iterations driving the test through configurations
Best QTP Interview Questions And Answers
- What is object repository in QTP?
- Mention the test steps of QTP.
- Explain the QTP test phases.
- How to handle Java tree in QTP?
- How does QTP identify GUI object?
- What are the recording modes in QTP?
- Explain object spy in QTP.
- Why is action split used by QTP?
- Why we load add-ins in QTP?
- Mention the different actions types of QTP.
- Explain the checkpoints in QTP.
When the QTP program learns any new object, the program stores it in its object repository along with all its properties. QTP has two types of object repositories:
- Local Object Repository: Linked to only one test, and easy to make changes and actions with it. Here objects are saved with .mtr extension.
- Shared Object Repository: Can be used between multiple test cases, but no changes can be made here. Objects are saved here with TSR extension.
The user has to select Java Add-In and launch QTP. Then the tester has to record operations on the Java Tree. If any issue appears while testing, the examiner can choose Tools > Object Identification > Java, tree object and make changes in assistive and mandatory properties to enable the identification.
QTP identifies GUI object based on corresponding properties. At the time of recording, the tool will detect and store beautiful features in the GUI object’s object repository. It will compare the stored property values with the present on-screen properties to uniquely identify the GUI object.
QTP tool supports three types of recording modes:
- Contextual Recording Mode: It’s the default recording mode of QTP and recognizes test objects regardless of their on-screen position.
- Low-level Recording Mode: It records the exact x,y coordinates of mouse operations, and useful in testing hashmaps and objects not identified by contextual mode.
- Analog Mode: This records the exact mouse and keyboard movements that users perform about the application window.
An object spy is a tool present in QTP that helps testers to view the object operations and properties linked to then in AUT. The object spy can retrieve all the object properties and their values, and uniquely identify the objects with a set of features to store them.
Action split is used to split the actions in QTP to two parts.
- Splitting into two sibling actions: The action breaks here are independent.
- Splitting into parent-child nested action: This action is only conducted when the first action of parent gets executed.
Add-in is used to increase the capability of the tool. Then can be added as required to different scenarios, such as:
- To enhance system capabilities
- To load a particular function into the memory
- To improve available graphics quality and communication interface
- To access separate tasks that are needed for script execution
There are three types of actions that can be performed in QTP.
- Reusable Action: Can be used multiple times from where they are stored.
- Non-Reusable Action: Can be used a single time from where they are the store.
- External Action: Reusable but stored in external tests. Available only in read-only mode.
QTP has various checkpoints which can be inserted in the test to compare two object values, current and expected values. The tool has the following inspections:
- Page checkpoint
- Bitmap checkpoint
- Image checkpoint
- Database checkpoint
- Text checkpoint
- Accessibility checkpoint
- Standard inspection
- XML checkpoint