Pages

Custom Search

QTP Interview Questions Part- 5

QTP Interview Questions Part- 5 

1) What are the extensions of QTP files?

o QTP Test / Test Script(.mts){.mts=module/mercury test script}
o Local Repository file (.mtr){.mtr=module/mercury test repository}
o Shared repository files(.tsr){Test shared repository}
o Library files (.vbs)
o Environmental files (.xml)
o Test batch file (.mtb){module test batch}
o QTP result file (xml) optional: pdf, doc, xml-for reporting
o Recovery scenario file (.qrs){quick recovery scenario}

2) How to handle dynamic objects?

By using Regular expressions we can handle dynamic objects.

3) What are the differences between checkpoint and output value?

Both are same in insertion but different in purpose.
Checkpoint is a verification point, it takes expected results from the user and compare with the actual results during execution and provides test results.
Output value captures object properties values, database content and xml elements values and stores in run time data table.
Checkpoints compare actual results with expected results, output values captures values and stores.

4) How to handle Repositories dynamically?

With Repositoriescollection utility object, we can handle shared object repositories dynamically.
Note: on Repositoriescollection object, we can use Add, Find, Remove, and Removeall like methods.

5) What is the use of environment variables?

Environment variables are global variables that we can use from number of tests commonly.
Whenever we want to use some variables from number of tests, instead of declaring as local variables, if we use environment variables concept then maintenance will be easy.

6) What is a Regular Expression, where we use this feature in QTP?

Regular expression is nothing but matching patterns.
In QTP, we use this feature for identifying dynamic objects

7) What is the advantage of Dynamic Descriptive Programming than Static?

Incase of dynamic programming Tests generation is easy and maintenance also very easy.

8) What are the limitations of QuickTest?

a. It supports MS Windows operating environment only
b. It doesn't support CLI Applications (Command line interface)
c. It supports IE only for generating scripts but it does not support Mozilla and other browsers. For executing tests it supports Mozilla like other browsers.
d. It has limited support for web services testing.

9) How to capture a moving image in QTP?

10) What is Smart Identification in QTP and explain it?

11) How many folders are created in one Test creation in QTP?

Two folders and six files.

12) What is Description object in QTP?


13) What are the Properties you use for identifying a Browser, a Page when using descriptive programming?

title property for Browser
title property for Page

14) How do you measure Transaction Time in QTP other than Using of Start and End Transaction Points?

By using 'Timer' function we can measure transaction times.

15) what is the Deference between  Recovery Scenario and "On Error Resume Next"?
1) Both are for handling Error events, Recovery Scenario is a QTP Tool feature, whereas "On Error Resume Next" is a VB Script feature

2) "On Error Resume Next" is used when we are sure about the step where the error can occur. Recovery Scenario can be used to handle unexpected event or error.
********************************************************
On Error Statement (Visual Basic) 
Enables an error-handling routine and specifies the location of the routine within a procedure; can also be used to disable an error-handling routine.
Without an On Error statement, any run-time error that occurs is fatal: an error message is displayed, and execution stops.
Whenever possible, we suggest you use structured exception handling in your code, rather than resorting to unstructured exception handling and the On Error statement.
 
16) Explain in brief about the QTP Automation Object Model.

QTP Automation Object model deals with Automation of QTP itself. Almost all configuration and functionality provided by QTP is represented by QTP's Automation Object Model . Almost all dialog boxes in QTP have a corresponding automation object which can set or retrieved using the corresponding properties or methods in the Automation Object Model.QTP Automation Objects can be used along with standard VB programming elements like iterative loops or conditional statements to help you design a script of choice

17) What is Test Fusion Report ?

Test Fusion Report , displays all aspects of a test run and is organized in a Tree format.
It gives details of each step executed for all iterations.
It also gives Run-time data table, Screen shots and movie of the test run if opted.

18) How can you handle exceptions in QTP?

In QTP Exceptional handling is done by using
a. Recovery Scenarios.
b. Using "On Error" statement
In Recovery scenario you have to define.
1. Triggered Events.
2. Recovery steps.
3. Post Recovery Test-Run.
At Script Level you can use the On Error Resume Next and On Error Go to 0 statement.

19) What is the Difference between Bitmap Check point & Image Check point?

Bitmap
checkpoint does a pixel to pixel comparison of an image or part of an image.
Image checkpoint does do a pixel to pixel comparison but instead compare image properties like alt text , destination url etc.

20) How would you export a Script from one PC to another in QTP ?

We can make use of the "Generate Script" function available in Object Identification, Test Settings and Tools/Options tab to create a zip of the script at the source computer. These zip files then can be imported into QTP at the destination computer.

21) Can launch two instances of QTP on the same machine ?

No. You can work with only single instance of QTP on the same machine. But QTP itself can work on multiple instances of the Application Under Test (AUT). Ex:  QTP can handle multiple IE browser windows.

22) What is SetToProperty ?

SetToProperty changes property of an object stored in the Object Repository. However these changes are not permanent.

23)  What is Accessibility Checkpoint?

World Wide Web Consortium (W3C) came up with some instructions and guidelines for Web-based technology and information systems to make it easy for the disabled to access the web. For example the standards make it mandatory to have an 'alt text' for an image. So a blind person who is accessing the website, will use text - to -speech converters and atleast understand what the image is about if not see it. All these standards are checked by Accessibility Checkpoints.

24) What is the difference between Properties and methods?

A property is a named attribute of an object. Properties define the characteristics of an object such as Size, Color etc. or sometimes the way in which it behaves.

A method is an action that can be performed on objects.

For example, a dog is an object. Its properties might include long white hair, blue eyes, 3 pounds weight etc. Its methods might be move, jump, play, breath etc.

No comments: