QTP interview questions and answers - contributed by Rohit Srivastava Q1. What phases are involved in testing an application in QTP?
The Quick Test Professional process consists of the following main phases:
Analyzing Application: before preparing test cases need to analyze the application to find out the testing needs. Preparing Testing Infrastructure: based on testing needs create those resources, resources like, shared repository, function library etc. Building Test Cases: create test script containing action to be performed while testing. Add object repository with the test function libraries. Enhancing Test: by making use of checkpoints, broadening the scope of test, add logic and condition to test for checking purpose. Debugging, Running and analyzing Test: debug the test so that it works without interruption. Run these test and analyze the test result generated by QTP Report Defects: lock bug into the bug report and send it to the development team.
Q2. How many types of recording modes in the QTP?
The QTP enable us with three type of recording mode:
Normal (by Default recording): In this recording mode QTP identify the object irrespective of their location on the screen. It is done by recording object based on application window. Analog Recording: it is used when exact mouse movement and action performed by mouse is important. Used in testing the paint application and signature made with the help of mouse. Low Level Recording: it helps in identifying those objects which is not recognized by the QTP. It is used when the location of object is changing inside the screen.
Q3. What is object repository?
Object Repository: when QTP learn any object from application it stores those object in the Object Repository with the properties of the object. It is used to identify the object. There are two types of object repository:
Shared Object Repository: It can be shared between multiple tests but it does not allow making changes in the repository. Mostly used in Keyword Driven methodology. It is saved with .TSR extension. Local Object Repository: This type of object repository is linked with only one test. In this we can perform change in the repository, like changing the properties of the object, adding object in the repository. It is saved with .MTR extension.
Q4. Explain step generator in QTP?
Step Generator in QTP helps in creating those steps which is performed over the object while testing. Use of Step Generator in QTP:
Help in debugging the script by making use of Break. To add those step which we forget to perform while recording. To ensure that objects exist in the repository To add up step in the function library.
Q5. Explain the use of Action Split in QTP?
Action Split: it is used to split the action into two parts. There are two type of split an action:
Splitting into two sibling action: both split actions are independent of each other. Splitting into Parent-Child nested action: in this second split action is only called after the execution of the parent split action. Child split action depends upon the parent split action.
QTP generated the duplicate copy of the object repository when we perform Split action. We can add object to anyone spilt action which is not added into another split action's repository. Q6. What is the purpose of loading QTP Add-Ins?
Add-Ins: are small programs or files which can be added to computer in order to enhance the capabilities of the system. The purposes of loading Add-Ins into QTP are following:
To increase capabilities of the system. To improve the graphics quality, communications interface. To load the particular function into the memory. To excess only those functions that is required for the execution of the script.
Q7. What is a data driven test in QTP?
Data Driven is an automation testing part in which test input or output values, these values are read from data files. It is performed when the values are changing by the time. The different data files may include data pools. The data is then loaded into variables in recorded or manually coded scripts. In QTP to perform the data to drive the test, we use the parameterization process. When we do data-driven test, we perform two extra steps:
Converting the test to a data-driven test. Creating a corresponding data table.
Q8. How to use Parameterization in QTP?
It is the process of making use of different values in place of recorded values which is replaced by variable which contains different values that can be used during the execution of the scripts. QTP enable us with different type of Parameterization, passing of data:
Using Loop statement. Dynamically test data submission Using data table. Fetching data from external files. Fetching data from databases. By taking test data front end(GUI)
Q9. Is it possible to call from one action to another action in QTP?
Yes, QTP enable us to call from one action to another action. There are two ways of calling action:
Call to Copy of action: in this we generate the copy of action in our repository which enables us to perform change to the copy of action. Call to Existing action: we call to action which is made up earlier. This generates the reference to the action. We can access the action in read only mode. In this no copy of existing script and data table is made.
Q10. Explain different types of action in QTP?
When generating the test script, it includes only one action. Action contains the number of steps to be performed on application to test the application. There are three type of action in QTP:
Non-Reusable action: it can be called by test only once in which it is stored. Reusable action: it can be called by test multiple times in which it is stored. External action: it is reusable action but stored in external test. We can call external action but it will be available in read only mode we cannot perform any change to the External Action.
Q11. What is difference between Run time object and Test object?
The difference between Run time Object and Test object are:
Run time object are actual object in the application whereas test object are reference of the actual object. Run time object always have same name whereas test object name varies in different environment. Test object are used to identify the actual object in the application which is run time objects. Run time object resides in the application whereas test object resides in the object repository.
Q12. Explain Measuring Transaction.
Measuring transaction means that to measure how much time it take to execute a set of step over the application. A transaction is collection of steps that we are intended to know how much time it take to execute. We can define the transaction by enclosing the set of steps with the start transaction and end transaction.
Start transaction: after encounter of start transaction time measurement start. End transaction: it is used to stop the time measurement.
Q13. Explain different checkpoints in QTP.
Checkpoint is a point where QTP current value or property of the object with the expected value or property of the object. When we insert the check point in the test, then in keyword view checkpoint is added in front of current row and in expert view a checkpoint statement is added. QTP enable us with following types of check point:
Standard Checkpoint: check properties of objects like button, combo boxes, list etc. Image Checkpoint: check value of an image Bitmap Checkpoint: check image zooming capability. Table Checkpoint: check information of a table. Text Checkpoint: check text is displayed on correct place. Text Area Checkpoint: check text is displayed in specific area. Accessibility Checkpoint: used to determine website which is not as per W3C guidelines. Page Checkpoint: checks properties of the webpage. Database Checkpoint: check content of database XML Checkpoint: check XML content.
Q14. Can we create a QTP test from QC?
Yes we can create QTP test from QC but we must first make sure QTP has the ability to execute tests from Quality Center. Please ensure the following option in QTP Run Settings is enabled:
When QTP is enabled, follow the below steps to schedule and execute tests from Quality Center:
1. Login to Quality Center and Navigate to Test Lab Module 2. After selecting the correct Test Set, Click the Execution Flow Tab. 3. Right-click on the test that requires configuration of Time Dependency and click Test Run Schedule. 4. In the Run Schedule window, select the Time Dependency tab. The time and date of execution can be configured. 5. Time dependency will be added to the relevant test. 6. After time dependency has been added, navigate back to the Execution Grid pane. From the Execution Grid, select the tests to be run at the designated date and time. 7. From the Automatic Runner dialog, click Run All. 8. Once Run All is clicked from the Automatic Runner dialog, the test status will change to Waiting and QC will fire the tests to be run at the scheduled date and time: 9. QC will fire the tests in the sequence configured in the Execution Flow pane. The Test Run Scheduler will show all the tests that were selected and are executing and are to be executed. What is QTP?
Latest answer: 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............ Read answer Explain the concepts of Test Fusion Report of QTP.
Latest answer: Test Fusion Report is a compilation of the entire testing process. It includes an overview of where the failure occurred, the test data that was used in testing, Screen shots to support............... Read answer How does Run time data (Parameterization) is handled in QTP?
Latest answer: QTP provides an integrated spreadsheet when test data is entered into the Data table. This spreadsheet works like Excel and allows creating multiple test iterations thereby saving............... Read answer Explain the QTP Tool interface.
Latest answer: The QTP tool interface has the following key items:
Title bar � used to display the name of the opened test. Menu bar � used to display the different menu items.................. Read answer
Explain how QTP recognizes Objects in AUT.
Latest answer: Object is any GUI element the user interacts with. As the user is testing the application, QTP records and stores each item the user interacts with. This is stored in an object repository. Each entry has a logical name and some properties to uniquely identify................... Read answer Explain the types of Object Repositories in QTP.
Latest answer: All objects recognized by QTP are stored in Object Repository. The object repository can either be local or shared................ Read answer Explain the check points in QTP.
Latest answer: Checkpoints in QTP allow the tester to verify if the functionalities deliver results as expected. Checkpoints can be inserted into a test or a test component and acts a verification point that.............. Read answer What is Parameterizing Tests?
Latest answer: In QTP, in order to test the same operation with different values, parameters can be passed. When parameters are sepcifed, the fixed values of the test are replaced by the parameters................ Read answer What is test object model in QTP?
Latest answer: A test model is used to represent objects in the application. It comprises of Object types and or classes. An object class is used to identify an object uniquely............. Read answer Difference between Image check-point and Bit map check point.
Latest answer: Image checkpoint allows property value like href tags, HTML tags of an image to be checked. It is also used to check the src tag to verify the image source file. Bit map checkpoint is specifically used to check an area of an application after capturing it as a bitmap................ Read answer
|