QuickTest Professional™ - An Automation Tool by Mercury - Questions and Answers

Saturday, January 10, 2009

QTP Question 41: What is the difference between Call to Action and Copy Action?

The changes made in Call to Action, will be reflected in the original action( from where the script is called).But where as in Copy Action , the changes made in the script ,will not effect the original script(Action)

Friday, January 09, 2009

QTP Question 40: How does Parametrization and Data-Driving relate to each other in QTP?

To data drive we have to parametrize i.e. we have to make the constant value as parameter, so that in each iteration(cycle) it takes a value that is supplied in run-time data table. Through parametrization only we can drive a transaction(action) with different sets of data. You know running the script with the same set of data several times is not suggestible, & it’s also of no use.

Thursday, January 08, 2009

QTP Question 39: Differences between QTP & Winrunner?

  • QTP is object bases Scripting ( VBS) where Winrunner is TSL (C based) Scripting.
  • QTP supports “.NET” application Automation not available in Winrunner
  • QTP has “Active Screen” support which captures the application, not available in WR.
  • QTP has “Data Table” to store script values , variables which WR does not have.
  • Using a “point and click” capability you can easily interface with objects, their definitions and create checkpoints after having recorded a script – without having to navigate back to that location in your application like you have to with WinRunner. This greatly speeds up script development

Wednesday, January 07, 2009

QTP Question 38: Types of properties that Quick Test learns while recording?

Types of properties that Quick Test learns while recording?

(a) Mandatory (b) Assistive .

In addition to recording the mandatory and assistive properties specified in the Object Identification dialog box, QuickTest can also record a backup ordinal identifier for each test object. The ordinal identifier assigns the object a numerical value that indicates its order relative to other objects with an otherwise identical description (objects that have the same values for all properties specified in the mandatory and assistive property lists). This ordered value enables QuickTest to create a unique description when the mandatory and assistive properties are not sufficient to do so.

Tuesday, January 06, 2009

QTP Question 37: What is a Run-Time Data Table? Where can I find and view this table?

In QTP, there is data table used , which is used at runtime.

Select the option View->Data table.

This is basically an excel file, which is stored in the folder of the test created, its name is Default.xls by default

Monday, January 05, 2009

QTP Question 36: Explain the keyword createobject with an example

It creates and returns a reference to an Automation object


CreateObject(servername.typename [, location])


servername:Required. The name of the application providing the object.

typename : Required. The type or class of the object to create.

location : Optional. The name of the network server where the object is to be created.

Sunday, January 04, 2009

QTP Question 35: How to handle dynamic objects in QTP?

QTP has a unique feature called Smart Object Identification/recognition. QTP generally identifies an object by matching its test object and run time object properties. QTP may fail to recognise the dynamic objects whose properties change during run time. Hence it has an option of enabling Smart Identification, wherein it can identify the objects even if their properties changes during run time.

Check this out-

If QuickTest is unable to find any object that matches the recorded object description, or if it finds more than one object that fits the description, then QuickTest ignores the recorded description, and uses the Smart Identification mechanism to try to identify the object. While the Smart Identification mechanism is more complex, it is more flexible, and thus, if configured logically, a Smart Identification definition can probably help QuickTest identify an object, if it is present, even when the recorded description fails.

The Smart Identification mechanism
uses two types of properties:

Base filter properties—The most fundamental properties of a particular test object class; those whose values cannot be changed without changing the essence of the original object. For example, if a Web link’s tag was changed from to any other value, you could no longer call it the same object.

Optional filter properties—Other properties that can help identify objects of a particular class as they are unlikely to change on a regular basis, but which can be ignored if they are no longer applicable.

Saturday, January 03, 2009

QTP Question 34: What are the different scripting languages you could use when working with QTP?

Visual Basic (VB), XML, JavaScript, Java, HTML are few of the different scripting languages you could use when working with QTP.

Friday, January 02, 2009

QTP Question 33: How to handle Run-time errors?

On Error Resume Next: causes execution to continue with the statement immediately following the statement that caused the run-time error, or with the statement immediately following the most recent call out of the procedure containing the On Error Resume Next statement. This allows execution to continue despite a run-time error.

You can then build the error-handling routine inline within the procedure.
Using “Err” object msgbox “Error no: ” & ” ” & Err.Number & ” ” & Err.description & ” ” & Err.Source & Err.HelpContext.

Thursday, January 01, 2009

QTP Question 32: How to analyze the Checkpoint results?

Using Standard Checkpoint

By adding standard checkpoints to your tests or components, you can compare the expected values of object properties to the object’s current values during a run session. If the results do not match, the checkpoint fails

Index of QTP Questions

  • QTP Question 01: What is QTPro? What is Quick Test Pro? What is Quick Test Professional?
  • QTP Question 02: What's New in QuickTest Professional 8.2?
  • QTP Question 03: Explain QTP Testing process?
  • QTP Question 04: How Does Run time data (Parameterization) is handled in QTP?
  • QTP Question 05: What is keyword view and Expert view in QTP?
  • QTP Question 06: Explain about the Test Fusion Report of QTP?
  • QTP Question 07: To which environments does QTP supports?
  • QTP Question 08: What is QTP or Quick Test Pro?
  • QTP Question 09: Explain the QTP Tool interface
  • QTP Question 10: How QTP recognizes Objects in AUT?
  • QTP Question 11: What are the types of Object Repositorys in QTP?
  • QTP Question 12: Explain the check points in QTP?
  • QTP Question 13: In how many ways we can add check points to an application using QTP?
  • QTP Question 14: How does QTP identifies the object in the application?
  • QTP Question 15: If an application name is changes frequently i.e while recording it has name, in this case how does QTP handles?