Username Password Remember Me Forgot your Password?

QuickTest Professional (QTP) Questions and Answers Part 3

HP Mercury QTP

What is the Diff between Image check-point and Bit map Check point?

Image checkpoints enable you to check the properties of a Web image. You can check an area of a Web page or application as a bitmap. While creating a test or component, you specify the area you want to check by selecting an object. You can check an entire object or any area within an object. QuickTest captures the specified object as a bitmap, and inserts a checkpoint in the test or component. You can also choose to save only the selected area of the object with your test or component in order to save disk Space For example, suppose you have a Web site that can display a map of a city the user specifies. The map has control keys for zooming. You can record the new map that is displayed after one click on the control key that zooms in the map. Using the bitmap checkpoint, you can check that the map zooms in correctly.
You can create bitmap checkpoints for all supported testing environments (as long as the appropriate add-ins are loaded).
Note: The results of bitmap checkpoints may be affected by factors such as operating system, screen resolution, and color settings.

{mosgoogle left} 

How many ways we can parameterize data in QTP ?

There are four types of parameters:
Test, action or component parameters enable you to use values passed from your test or component, or values from other actions in your test.
Data Table parameters enable you to create a data-driven test (or action) that runs several times using the data you supply. In each repetition, or iteration, QuickTest uses a different value from the Data Table.
Environment variable parameters enable you to use variable values from other sources during the run session. These may be values you supply, or values that QuickTest generates for you based on conditions and options you choose.
Random number parameters enable you to insert random numbers as values in your test or component. For example, to check how your application handles small and large ticket orders, you can have QuickTest generate a random number and insert it in a number of tickets edit field.

{mosgoogle left} 

How do u do batch testing in WR & is it possible to do in QTP, if so explain?

Batch Testing in WR is nothing but running the whole test set by selecting "Run Testset" from the "Execution Grid".The same is possible with QTP also. If our test cases are automated then by selecting "Run Testset" all the test scripts can be executed. In this process the Scripts get executed one by one by keeping all the remaining scripts in "Waiting" mode.


How to use the Object spy in QTP 8.0 version?

There are two ways to Spy the objects in QTP
1) Thru file toolbar
---In the File ToolBar click on the last toolbar button (an icon showing a person with hat). 2) Tru Object repository Dialog
---In Objectrepository dialog click on the button"object spy..."

In the Object spy Dialog click on the button showing hand symbol. the pointer now changes in to a hand symbol and we have to point out the object to spy the state of the object if at all the object is not visible..or window is minimised then Hold the Ctrl button and activate the required window to and release the Ctrl button.


What is the file extension of the code file & object repository file in QTP?

File extension of
-- Per test object rep :- filename.mtr
-- Shared Oject rep :- filename.tsr
Code file extension id script.mts


How to Creating an Output Value using QTP?

1 Start QuickTest and open the Parameter test.
2 Save the test as Output.
3 Confirm that the Active Screen option is enabled.
4 Select the text you want to use as an output value.
5 Set the output value settings.
6 Modify the table checkpoint.
7 Save the test.

What does it mean when a check point is in red color? what do u do?

A red color indicates failure. Here we analyze the the cause for failure whether it is a Script Issue or Envronment Issue or a Application issue.


What do you call the window testdirector-testlab?

"Execution Grid". It is place from where we Run all Manual / Automated Scripts


How do u create new test sets in TD

Login to TD.
Click on "Test Lab" tab.
Select the Desired folder under which we need to Create the Test Set. ( Test Sets can be grouped as per module.) Click on "New Test Set or Ctrl+N" Icon to create a Test Set.


Explain the concept of object repository & how QTP recognises objects?

Object Repository: displays a tree of all objects in the current component or in the current action or entire test( depending on the object repository mode you selected). we can view or modify the test object description of any test object in the repository or to add new objects to the repository. Quicktest learns the default property values and determines in which test object class it fits.If it is not enough it adds assistive properties, one by one to the description until it has compiled the unique description.If no assistive properties are available, then it adds a special Ordianl identifier such as objects location onthe page or in the source code.


What are the properties you would use for identifying a browser & page when using descriptive programming ?

"name" would be another property apart from "title" that we can use. OR We can also use the property "micClass". ex: Browser("micClass:=browser").page("micClass:=page")....


I want to open a Notepad window without recording a test and I do not want to use SystemUtil.Run command as well How do I do this?

U can still make the notepad open without using the record or System utility script, just by mentioning the path of the notepad "( i.e., where the notepad.exe is stored in the system) in the "Windows Applications Tab" of the "Record and Run Settings window. Try it out. All the Best.


If an application name is changes frequently i.e while recording it has name, in this case how does QTP handles?

If an application name is changes frequently i.e while recording it has name ?Window1? and then while running its ?Windows2? in this case how does QTP handles? QTP handles those situations using ?Regular Expressions?. ...


How does QTP identifies the object in the application?

How does QTP identifies the object in the application? QTP identifies the object in the application by LogicalName and Class. For example: The Edit box is identified by Logical Name : PSOPTIONS_BSE_TIME20 Class: WebEdit ...


IF we use batch testing.the result shown for last action only.in that how can i get result for every action.

You can click on the icon in the tree view to view the result of every action

 

WinRunner Compared to QuickTest Pro



Environment Coverage Comparison:


Common environments shared by both WinRunner and QuickTest Pro:


Web-Related Environments

IE, Netscape, AOL

 

JDK, Java Foundation Classes, AWT

 

Symantec Visual Café

 

ActiveX Controls

ERP/CRM

Oracle: Jinitiator, 11i, NCA

Custom Client Server

Windows

 

C++/C

 

Visual Basic

Operating Systems

Windows 98, 2000, NT, ME, XP

Legacy

3270, 5250 Emulators

 

VT100

 

*      WinRunner Only Environments:

Custom Client/Server

PowerBuilder

 

Forte

 

Delphi

 

Centura

 

Stingray

 

SmallTalk

ERP/CRM

Baan

 

PeopleSoft Windows

 

Siebel 5, 6 GUI Clients

 

Oracle GUI Forms

 

*      QuickTest Pro Only Environments:

ERP/CRM

SAP

 

Siebel 7.x

 

PeopleSoft 8.x

.Net

WinForms

 

WebForms

 

.Net controls

Web Services

XML, HTTP

 

WSDL, SOAP

 

J2EE, .Net

Multimedia

RealAudio/Video

 

Flash

 

 

 

Feature Comparison:

 

*      Common features found in both WinRunner and QuickTest Pro:

Record/Replay

ODBC & Excel Connectivity

Code Editor & Debugger

Recovery Manager

Shared Object Repository

Rapid Object Import

Numerous Checkpoints

Analog

Script & Function Libraries

 

 

*      WinRunner Only Environments:

Function Generator

Database Integration

Run Wizard

TSL

MDI

 

 

*      QuickTest Pro Only Environments:

ActiveScreen

TestGuard

Tree View

ScriptFusion

Data Table

VBScript

Function Generator*

(coming in v7.0)

Run Wizard*

(coming in v7.0)

How to Import data from a ".xls" file to Data table during Runtime.

Datatable.Import "...XLS file name..."
DataTable.ImportSheet(FileName, SheetSource, SheetDest)
DataTable.ImportSheet "C:\name.xls" ,1 ,"name"


How to export data present in Datatable to an ".xls" file?

DataTable.Export "....xls file name..."


Syntact for how to call one script from another? and Syntax to call one "Action" in another?

RunAction ActionName, [IterationMode , IterationRange , Parameters]
Here the actions becomes reusable on making this call to any Action.
IterationRange String Not always required. Indicates the rows for which action iterations will be performed. Valid only when the IterationMode is rngIterations. Enter the row range (i.e. "1-7"), or enter rngAll to run iterations on all rows.
If the action called by the RunAction statement includes an ExitAction statement, the RunAction statement can return the value of the ExitAction's RetVal argument.


How to export QTP results to an ".xls" file?

By default it creates an "XML" file and displays the results


How the exception handling can be done using QTP

It can be done Using the Recovery Scenario Manager which provides a wizard that gudies you through the process of defining a recovery scenario. FYI.. The wizard could be accesed in QTP> Tools-> Recovery Scenario Manager .......


How many types of Actions are there in QTP?

There are three kinds of actions:
non-reusable action—an action that can be called only in the test with which it is stored, and can be called only once. reusable action—an action that can be called multiple times by the test with which it is stored (the local test) as well as by other tests.
external action—a reusable action stored with another test. External actions are read-only in the calling test, but you can choose to use a local, editable copy of the Data Table information for the external action.


Analyzing the Checpoint results

Standard Checpoint :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.

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


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

Visual Basic (VB),XML,JavaScript,Java,HTML


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.


Explain the keyword createobject with an example.

Creates and returns a reference to an Automation object
syntax: CreateObject(servername.typename [, location])
Arguments
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.


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.
-In QTP, select the option View->Data tabke.
-This is basically an excel file, which is stored in the folder of the test created, its name is Default.xls by default.


How to do the scripting. Is there any inbuilt functions in QTP as in QTP-S. Whatz the difference between them? how to handle script issues?

Yes, there's an in-built functionality called "Step Generator" in Insert->Step->Step Generator -F7, which will generate the scripts as u enter the appropriate steps.


What is the difference between check point and output value.

An outPut value is a value captured during the test run and entered in the run-time but to a specified location. EX:-Location in Data Table[Global sheet / local sheet]







Another articles:


Search Articles  


Your place for 1000+ free Software Testing and QA articles, testing tools, discussions, news and the best bunch of testers on the net.
q       What is Software QA Testings?     q       Privacy Policy 
q       Join Software QA Testings Today   q       Contact US
q       Chapters, Sections and Articles