QTP Interview Questions

What is QTP’s model for test creation?

Determine testing needs – Define testing environment, Analyse your application and plan actions
Set up repositories – Local or Shared OR
Define function libraries
Generate test steps – Add steps, Add checkpoints
Data drive your tests
Run the tests

Does QTP run in any environment?

No, QTP works only in the windows environment.

Explain the views in the QTP GUI?

Keyword view: This view is a tabular representation of all the objects and the actions that are performed on them. Every row in the table is a step performed on the AUT and can be modified. Some of the most common columns displayed are: item, operation, value and documentation.
Expert view: As the name indicates, this view is for more technical users who would want to tweak the source code as per their requirements.

What are the different kinds of test steps?

5 types of steps:
– Test Object ( Performs actions on a TO)
– Functions
– Utility (Steps to control run session. Eg: Reporter.report)
– Comment
– Programming logic (Loop, conditions…etc)

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.

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.

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.

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.

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.

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.

Interested in mastering QTP Training? Enroll now for FREE demo on QTP Training.

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.

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)

Different types of QTP test assets and their extensions:

types of QTP test assets and their extensions

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.

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.

What are advantages of test automation?

  • Time – It produces quick results
  • No Manual intervention
  • Cost effective
  • Not prone to human errors

If the objects hierarchy is changing from build to build, then how you will handle that condition?

In this case descriptive programming can be used instead of having an OR. Even while descriptive programming try to use regular expressions to identify the unique property of the objects.

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.

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.

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.

Describe Synchronization Point.

Synchronization Point: When application response speed is not same as the test execution speed this may cause error. In order to remove this error we use Synchronization point. Synchronization is done by making QTP test to wait until the application is ready for execution. When we insert Synchronization point in test then QTP generates the WaitProperty Statement in the ExpertView. For synchronization we can use:

– Exist statement
– Wait statement.
– Increase the defaulted time of QTP waits for web page to load.
– Change in default timeout setting.

What is expert view and keyword view?

Expert View: It contains the steps performed over the application in VBScript language.

– Expert view enables us to editing the script.
– In keyword view a row exist for each object and method which is mention in Expert View.

Keyword View: contains the steps executed on the application in keyword driven tabular form in English language.

– Keyword View contains four fields: ITEM, Operation, Value, and Document.
– Selecting items and operation we can create and modify test.

What is Keyword Driven Framework?

In Keyword driven framework the QTP executed script which is written in the excel sheet by help of Driver Script. For making Keyword Driven Framework we have two ways:

– Specify Script Values Directly in the Excel
– Write Global Functions to perform action on application as function keywords in Excel.

What are benefits of QTP?

The benefits of QTP are:

– Standalone tool and integrated with Quality Center.
– Testing results stores in database automatically, can be used for analyzing system performance.
– Supports Key word driven testing.
– QTP Identifies objects, even if they change from build to build.
– By using QTP, Test execution time and cost will reduce.
– Suitable for both client server and web based application
– Better error handling mechanism
– Excellent data driven testing features

What are the disadvantages of recording test cases in QTP?

Following are the Disadvantage of recording test cases in QTP

– Occupies lot of space result in reducing QTP performance.
– Updating test is difficult.
– Internal to the QTP, which may cause corrupted.

What is expert view and keyword view?

Expert View: It contains the steps performed over the application in VBScript language.

– Expert view enables us to editing the script.
– In keyword view a row exist for each object and method which is mention in Expert View.

Keyword View: contains the steps executed on the application in keyword driven tabular form in English language.

– Keyword View contains four fields: ITEM, Operation, Value, and Document.
– Selecting items and operation we can create and modify test.

What is the process of synchronizing QTP and AUT?

We can synchronize QTP and AUT by applying any one of the following methods:

– Wait statement.
– Using exit statement
– Synchronization point.
– Increasing timeout.( tool default synchronization point)
– Syn (synchronize method) method

What is difference between design time and runtime data table?

The differences between Design time and Run time table are:

– Design time table are visible in QTP main test but Run time table is visible in Test Result Window.
– Design time table is created before the execution of test whereas Run time table is created after execution of test.
– Design time table referred to the external data but Run time table represent actual design table in the application.

What is difference between Shared and Local Object Repository?

The difference between Shared and Local Object Repository are:

– Shared OR can be shared between multiple tests whereas Local OR can only link with one test.

– Shared OR does not allow making changes in the repository but Local OR enable tester to perform change in the object property present in the Object Repository or adding object in OR.

– Mostly used in Keyword Driven methodology. It is saved with .TSR extension where as Local OR is saved with .MTR extension.

What are the shot cut keys for the following?

Normal Recording: F3
Run the test script: F5
To stop the recording: F4
For Analog Recording:Ctrl+Shift+F4
Low Level Recording: Ctrl+Shift+F3
To switch between Tree View and Expert View: Ctrl+Tab

What is recovery scenario in QTP?

While executing a test, some unexpected error and event may occur. To overcome this we take the help of Recovery Scenario. The Recovery Scenario Consist of Following:

Trigger Event: when an unexpected events or errors invoke.

Recovery Operation: Operation needed to perform for running the remaining test script.

Post-Recovery Test Run Option: after recovering from unexpected error where to start the remaining test execution.

What are the steps involved in Recovery Scenario Wizard?

The Recovery Scenario Wizard consists of following steps:

– Defining of trigger event.
– Defining Recovery operation.
– Selection of Post Recovery Run.
– Specifying either to associate recovery scenario to the current test or all new test.

Explain different type of event trigger option.

In QTP, there are following type of trigger:

POP-UP window: QTP identify POP-UP window based on window title and textual content.
Object State: object state is identified by its properties.
Test Run Error: when test run result value is failed it is identified.
Application Crash: this state is identified by predefined list of application.

What are the different types of Recovery Operation?

Following type of Recovery Operation is available in QTP:

– Keyboard or mouse operation.
– Close Application Process.
– Function call.
– Restart Microsoft Windows.

Describe Function Procedure in VBScript.

Function procedure: it consists of steps of statements written in VBScript with some return value.

– Function statement is used to declare name, argument and code.
– When no argument is given it take empty parentheses ().
– Name is used to return the value.

SYNTAX of Function Procedure:

[Public][Default][Private] Function name [(arglist)]
[Statements]
[name = expression]
[Exit Function]
[Statements]
[name = expression]
End Function

How to handle Java tree in QTP?

You will need to select and load the Java Add-in. Then you can record and work on a Java Tree object just like you would with any other object.

How to give call to another action from one action?

Calling one action from the other can be done by “Inserting a call” to an existing action or by creating a new action. Please refer tutorial #21 for detailed explanation.

How to find Operating system information using QTP script?

You can do that with the help of environment variable. The exact variable is, OS and OS Version is for the version information.

How you can identify browser and its information using QTP script?

You can identify and act on any browser that you opened again by referring to its ‘creationtime’ property and use it like you would with a browser object in your OR.

How are actions and functions different in QTP?

Actions have their own Datatables and OR, but functions don’t. More importantly, Functions are a VB Scripting element, not only applicable to QTP. Please refer article 21 a detailed explanation of these.

How to remove associated Function library?

To remove the associated Function Library we can perform any one of the following method:

METHOD 1:

– Select Resource Pane.
– Right click on function library, select Remove Function Library.

METHOD 2:

– Select Resource Pane,
– Select Function Library.
– Press DELETE key.

METHOD 3:

– Go to list of Associated Function Library in the Resource Pane.
– Select the Function and click the Remove button.

What is reusable action?

An action that can be called multiple times within or outside the same test is called reusable action. By default all actions are reusable.

What are the different attribute used with Regular Expression?

The different attribute of Regular Expression are:

Backslash(\): when it is encountered the next character is treated as literal character.
Period(.): is used to search any single character.
Square Bracket[ ]: is used to search a single character within a list of characters.
Caret(^): is used match any character in the list except those specified in string.
Asterisk(*): to match zero or all occurrence of the preceding characters.

What is difference in Global and action sheet in QTP?

Global Sheet: Globally accessible by all tests. Used when we have to perform many actions by using single script.

Action Sheet: Locally accessible in a test. It is used when only one action is performed with one script.

Explain XML Checkpoints.

XML Checkpoints are used for the verification of the current and expect value or properties of the XML documents. A checkpoint fails when actual and expected values or properties are not same. QTP enables us with three types of XML Checkpoints:

– XML Web Page or Frame Checkpoints.
– XML File Checkpoints.
– XML Test Object Checkpoints.

How to modify the Text Checkpoint?

To modify the Checkpoint in QTP we do the following:

– Go to Keyword View, Right-Click the Checkpoint.
– Select Checkpoint Properties.
– Checkpoint properties dialog box open, change the setting.

Give the Syntax to load Function at run time.

Syntax to load the function at run time:

LoadFunctionLibrary strCurrentLibPath + “DialogCrashChecks.qfl”, strCurrentLibPath + “DialogL18nChecks.qfl”

What is the use of Ordinal identifier in QTP?

Ordinal Identifiers are used to initialize the value to the object which is in numeric form and it is used to find out its order with respect to other objects. QTP enable us with following types of Ordinal Identifiers:

Index: indicates the order of object.

Location: determine the location of the object like inside the parent window, frame or dialog box relative to other objects.

Creation Time: determine the order in which web browser open.

How to delete an object from the Object Repository?

To delete an object from the repository:

– Go to repository tree, select the object.
– Click the Delete button or select Edit> Delete.
– Click Yes to confirm.

What is Cross Site Scripting?

Cross Site Scripting is a thread in the dynamic website. It is also known as XSS. Cross site scripting occurs when a web application gathers malicious data from a user. The data is collected in the hyperlink form which contains malicious content within it. It allows malicious code to be inserted into the web page. The web page can be a simple HTML code or a client side script. When the malicious code is inserted in page and clicked by some user, the malicious code becomes a part of the web request of the user. This request can also execute on the user’s computer and steal information.

What is contained in the Object Repository?

Object Repository stores the element identification properties extracted from the application during recording. ID will be generated for each element and this ID is used for Object identification in the application. Object Repository acts as a repository for the application elements. Object Repository contains two properties of each object for the identification:

– Physical properties description of the object
– Logical name of the object.

Hybrid framework supports Descriptive programming. Is it true?

Yes. Frameworks are mostly based on how and where you want your test assets to be placed and how they are to be accessed for maximum efficiency. They do not restrict how you write you test itself.

What are the advantages of Hybrid framework?

Hybrid framework is nothing but a combination of frameworks that make you arrive at a solution for your testing needs by taking what works best for your scenario. The obvious advantage is the versatility. It can be tailored to meet any testing project’s need.

What is Procedure or Subroutine in VBScript?

Sub procedure is a series of VB Script statements (enclosed by Suband End Sub statements) that perform actions but don’t return a value. A Sub procedure can take arguments (constants, variables, or expressions that are passed by a calling procedure). If a Subprocedure has no arguments, its Sub statement must include an empty set of parentheses ().

Is VBScript Case sensitive or Case insensitive?

It is not case sensitive with respect to command and variable names. Everything else, like strings (text) is.

What is the difference between keyword view and expert view?

They are two ways QTP shows your test. Each one has their own features and caters to users of different levels of expertise.

Keyword view: This is a tabular representation of your test that has the information like the Item, Operation,Data and Comments.

Expert view: This displays your test in terms of the actual lines of code. It is more like a VB Script editor and is used by advanced users.

Summary
Review Date
Reviewed Item
QTP Interview Questions
Author Rating
51star1star1star1star1star

“At TekSlate, we are trying to create high quality tutorials and articles, if you think any information is incorrect or want to add anything to the article, please feel free to get in touch with us at info@tekslate.com, we will update the article in 24 hours.”

0 Responses on QTP Interview Questions"

    Leave a Message

    Your email address will not be published. Required fields are marked *

    Support


    Please leave a message and we'll get back to you soon.

    3 + 5