Tuesday, July 6, 2010

QTP (HP0-M16) Certification Questions and Answers - 5

QTP (HP0-M16) Certification Questions and Answers - 5

By Jigar Gosai
Email: jigar.gosai@gmail.com

Cell# +91-9825118192

41) Object Spy can be found in ........menu.

A) Tool
B) Tools
C) Task
D) Tasks

42) ............ displays the open documents side-by-side.

A) Tile Vertically
B) Tile Horizontally
C) Cascade
D) Tile Cascade

43) For opening the QuickTest Professional Help we can use.......

A) F3
B) F5
C) F1
D) F2

44) If QTP cannot find any object that matches the description, or if it
finds more than one object that matches, QuickTest may use
the............mechanism to identify the object.


A) Ordinal Identifier
B) Index Identifier
C) Smart Identification
D) Assistive Identification

45) You can configure the ........, ............ and ............
properties that QuickTest uses to record descriptions of the objects in
your application


A) mandatory, assistive, and ordinal identifier
B) mandatory, required, and ordinal identifier
C) smart, assistive, and ordinal identifier
D) Index, assistive, and ordinal identifier

46) The .......... property set for each test object is created and
maintained by QuickTest.


A) Run-Time Object
B) Test Object
C) Smart Identification Object
D) Assistive Object

47)You can access and perform ......... methods using the Object property.

A) Run-Time Object
B) Test Object
C) Smart Identification Object
D) Assistive Object

48) You can view or modify the test object property values that are
stored with your test in the .........


A) Information Pane
B) Data Table
C) Information Pane & Data Table Both
D) Object Properties & Object Repository dialog box.

49) You can retrieve or modify property values of the test object during
the run session by adding ..........statements in the Keyword View or
Expert View.


A) GetROProperty & SetROProperty
B) GetTOProperty & SetTOProperty
C) GetTOProperty & SetROProperty
D) GetROProperty & SetTOProperty

50) If the available test object methods or properties for an object do
not provide the functionality you need, you can access ..............of
any run-time object using the Object property.


A) The internal methods and properties
B) The mandatory methods and properties
C) The selective methods and properties
D) The assistive methods and properties


Answers
41) B, 42) A, 43) C, 44) C, 45) A, 46) B, 47) A, 48) D, 49) B, 50) A

By Jigar Gosai
Email: jigar.gosai@gmail.com

Cell# +91-9825118192

QTP (HP0-M16) Certification Questions and Answers - 5

QTP (HP0-M16) Certification Questions and Answers - 4

QTP (HP0-M16) Certification Questions and Answers - 4

By Jigar Gosai
Email: jigar.gosai@gmail.com

Cell# +91-9825118192

31) You can manage the test actions and the test or function library
steps using the ... menu commands


A) File
B) Edit
C) Automation
D) Tools

32) To expand all the steps in the keyword view which option you would
use from the View menu.


A) Expand
B) Expand All
C) Expand Items
D) Expand Rows

33) What is the shortcut key to open a Step Generator.

A) F2
B) F5
C) F6
D) F7

34) Function Definition Generator in found in which menu option.

A) File
B) Tools
C) Insert
D) View

35) The shortcut keys for Record, Stop and Run respectively are

A) F3, F4, F5
B) F4, F3, F5
C) F4, F5, F3
D) F3, F5, F4

36) What is the shortcut key for opening an Object Repository.

A) Alt+R
B) Shift+R
C) Ctrl+R
D) Shift+O+R

37) Shortcut key to Insert/Remove a breakpoint is

A) F9
B) F8
C) Ctrl+b
D) Shift+b

38) .........runs only the current line of the script. If the current
line calls a method, the method is displayed in the view but is not
performed.


A) Step Over
B) Step Out
C) Step Into
D) Step Till

39) .........runs only the current line of the script. When the current
line calls a method, the method is performed in its entirety, but is not
displayed in the view.


A) Step Over
B) Step Out
C) Step Into
D) Step Till

40) What is the shortcut key to Clear all Breakpoints

A) Ctrl+Shift+F9
B) Shift+Ctrl+F9
C) Alt+Shift+F9
D) Alt+Ctrl+F9

Answers
31) B, 32) B, 33) D, 34) C, 35) A, 36) C, 37) A, 38) C, 39) A, 40) A

By Jigar Gosai
Email: jigar.gosai@gmail.com

Cell# +91-9825118192

QTP (HP0-M16) Certification Questions and Answers - 3

QTP (HP0-M16) Certification Questions and Answers - 3

By Jigar Gosai
Email: jigar.gosai@gmail.com

Cell# +91-9825118192

21) Panes in QTP can have one of the following states—docked or floating.

A) True
B) False

22) Which of the following statement is True:

A) QuickTest enables you to open and work on one test at a time
B) QuickTest enables you to open and work on two tests at a time
C) QuickTest enables you to open and work on predefined number of tests
at a time
D) QuickTest enables you to open and work on nine test at a time

23) Which of the following statement is True:

A) You can open and work on two function libraries simultaneously
B) You can open and work on multiple function libraries simultaneously
C) You can open and work on nine function libraries simultaneously
D) You can open and work on one function library at a time

24) You can open any function library, regardless of whether it is
associated with the currently open test.


A) True
B) False

25) You can work with multiple documents (test, component, or
application area, function libraries) using the...... dialog box

A) Panes
B) Display
C) Show
D) Windows

26) QuickTest has ..... built-in toolbars.
A) 5
B) 6
C) 7
D) 8

27) The ......... toolbar contains buttons for recording and running
your test.


A) Standard
B) Tools
C) Automation
D) Edit

28) Shortcut Key for opening a new Function Library is:

A) Shift+Alt+N
B) Ctrl+Alt+N
C) Shift+N
D) CRTL+N

29) Shortcut Key for Closing all open Function Libraries in one go.

A) Ctrl+Alt+C
B) Shift+A+C
B)Shift+N
D) None of these

30) shortcut Key for Commenting out the current row, or selected rows

A) Shift+M
B) Ctrl+C
C) Ctrl+M
D) Shift+C

Answers

21) A, 22) A, 23) B, 24) A, 25) D, 26) D, 27) C, 28) A, 29) D, 30) C

By Jigar Gosai
Email: jigar.gosai@gmail.com

Cell# +91-9825118192

QTP (HP0-M16) Certification Questions and Answers - 2

QTP (HP0-M16) Certification Questions & Answers - 2
By Jigar Gosai
Email: jigar.gosai@gmail.com

Cell# +91-9825118192

11) The Information pane provides a list of............. in the test:
A) Semantic errors
B) Syntax errors
C) Common errors
D) Logic errors

12) When we switch from Expert view to the Keyword view, QTP
automatically checks for syntax errors in the test and shows them in the
information pane.


A) True
B) False

13) If the information pane is not open, QTP automatically opens it in
case a syntax error is detected.


A) True
B) False

14) ..................... provides a list of the resources that are
specified in your test but cannot be found.

A) Missing pane
B) Missing Resources pane
C) Resources pane
D) Missing Items pane

15) Whenever you open a test or a function library, QTP automatically
checks for the availability of specified resources.


A) True
B) False

16) The Data Table does not assists you in parameterizing your test.

A) True
B) False

17) Tabs in the Debug Viewer pane are:

A) Watch, Variables, Debug
B) Watch, Data, Command
C) Watch, Variables, Command
D) View, Variables, Command

18) ............... tab enables you to view the current value of any
variable or VBScript expression.


A) Watch
B) VIew
C) Locate
D) Current

19) The .... tab displays the current value of all variables that have
been recognized up to the last step performed in the run session.


A) View
B)Variables
C) Locate
D) Current

20) The .........tab enables you to run a line of script to set or
modify the current value of a variable or VBScript object in your test
or function library.


A) View
B) Variables
C) Command
D) Current

Answers

1) B, 12) A, 13) A, 14) B, 15) A, 16) B, 17) C, 18) A, 19) B, 20) C

By Jigar Gosai
Email: jigar.gosai@gmail.com

Cell# +91-9825118192

QTP (HP0-M16) Certification Questions and Answers - 1

QTP (HP0-M16) Certification Questions and Answers - 1
By Jigar Gosai
Email: jigar.gosai@gmail.com

Cell# +91-9825118192

1) 'Browser navigation timeout' is in which tab of Test Settings
(File->Settings) window.


A) Properties
B) Resources
C) Web
D) Web Settings

2) How many tabs are there in Test Settings (File->Settings) window

A) 7
B) 6
C) 5
D) 8

3) Identify the tabs in the Test Settings (File->Settings) window

A) Properties, Run, Resources, Parameters, Environment, Web, Recovery
B) Properties, Run, Resources, Parameters, Environment, Web
Settings,Recovery
C) Properties, Run Options, Resources, Parameters, Environment, Web,
Recovery
D) Properties, Run, Resources, Input Parameters, Environment, Web, Recovery

4) 'Generate Script' is in which tab of Test Settings (File->Settings)
window


A) Properties
B) Web
C) Resources
D) Recovery

5) The following are the four main columns in the Keyword view

A) Item, Operation, Value, Comments
B) Item, Operation, Value, Documentation
C) Item, Operation, Property, Documentation
D) Number, Operation, Value, Documentation

6) For each object and method in an Expert View statement, a
corresponding row exists in the Keyword View.


A) True
B) False
C) There is a problem with the statement.
D) None of above

7) You can work on one or several function libraries at the same time.

A) True
B) False

8) You can insert additional steps on the test objects captured in the
Active screen after the recording session.


A) True
B) False

9) The Active Screen enables you to parameterize object values and
insert checkpoints


A) True
B) False

10) A QTP user can increase or decrease the active screen information
saved with the test.


A) True
B) False

Answers

1) C, 2) A, 3) A, 4) A, 5) b, 6) A, 7) A, 8) A, 9) A, 10) A

By Jigar Gosai
Email: jigar.gosai@gmail.com

Cell# +91-9825118192

Friday, June 11, 2010

File System Scripts

File System Scripts
File System Scripts
1) Create a Folder

Option Explicit
Dim objFSO, objFolder, strDirectory
strDirectory = "D:\Jigargosai"
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFolder = objFSO.CreateFolder(strDirectory)

2) Delete a Folder

Set oFSO = CreateObject("Scripting.FileSystemObject")
oFSO.DeleteFolder("E:\Jigargosai")

3) Copying Folders

Set oFSO=createobject("Scripting.Filesystemobject")
oFSO.CopyFolder "E:\gcr", "C:\jvr", True

4) Checking weather the folder available or not, if not creating the folder

Option Explicit
Dim objFSO, objFolder, strDirectory
strDirectory = "D:\Jigargosai"
Set objFSO = CreateObject("Scripting.FileSystemObject")
If objFSO.FolderExists(strDirectory) Then
Set objFolder = objFSO.GetFolder(strDirectory)
msgbox strDirectory & " already created "
else
Set objFolder = objFSO.CreateFolder(strDirectory)
end if

5) Returning a collection of Disk Drives

Set oFSO = CreateObject("Scripting.FileSystemObject")
Set colDrives = oFSO.Drives
For Each oDrive in colDrives
MsgBox "Drive letter: " & oDrive.DriveLetter
Next

6) Getting available space on a Disk Drive

Set oFSO = CreateObject("Scripting.FileSystemObject")
Set oDrive = oFSO.GetDrive("C:")
MsgBox "Available space: " & oDrive.AvailableSpace

File System Operations

File System Operations

File System:

By Jigar Gosai
Email: jigar.gosai@gmail.com


Its an operating system feature, it allows users to create, modify,
view and delete; drives,folders and files

VB Script is providing an object called scripting.filesystemobject
and some methods for performing file systems operations

Syntax for creating file system object:

Set variable=createobject ("scripting.filesystemobject")

Examples:

'Create a folder
Dim fso, strFolder
strFolder="D:\Documents and Settings\jigargosai\Desktop\smvs"
Set fso=createobject("scripting.filesystemobject")
fso.CreateFolder(strFolder)

'Create a folder
Dim fso, strFolder
strFolder="D:\Documents and Settings\jigargosai\Desktop\smvs"
Set fso=createobject("scripting.filesystemobject")
If fso.FolderExists(strFolder) Then
msgbox "Folder already exists"
else
fso.CreateFolder(strFolder)
End If

By Jigar Gosai
Email: jigar.gosai@gmail.com

VB Script Objects

VB Script Objects
VB Script Objects

Jigar Gosai Email: jigar.gosai@gmail.com

a) Dictionary Object


Dictionary Object that stores data key, item pairs.

A Dictionary object is the equivalent of a PERL associative array/Hash Variable. Items can be any form of data, and are stored in the array. Each item is associated with a unique key. The key is used to retrieve an individual item and is usually an integer or a string, but can be anything except an array.



Creating a Dictionary Object:

Set objDictionary = CreateObject("Scripting.Dictionary")
Dictionary Objects Methods:

Add Method

Adds a key and item pair to a Dictionary object

Exists Method

Returns true if a specified key exists in the Dictionary object, false if it does not.

Items Method

Returns an array containing all the items in a Dictionary object.

Keys Method

Returns an array containing all existing keys in a Dictionary object.

Remove Method

Removes a key, item pair from a Dictionary object.

RemoveAll Method

The RemoveAll method removes all key, item pairs from a Dictionary object.

Example:

Dim cities
Set cities = CreateObject("Scripting.Dictionary")
cities.Add "h", "Hyderabad"
cities.Add "b", "Bangalore"
cities.Add "c", "Chennai"


Dictionary Objects Properties:
Count Property

Returns the number of items in a collection or Dictionary object. Read-only.

CompareMode Property
Sets and returns the comparison mode for comparing string keys in a Dictionary object.

Key Property

Sets a key in a Dictionary object.

Item Property
Sets or returns an item for a specified key in a Dictionary object. For collections, returns an item based on the specified key. Read/write.

Examples:

1) Add Elements to a Dictionary

Set objDictionary = CreateObject("Scripting.Dictionary")

objDictionary.Add "Printer 1", "Printing"   
objDictionary.Add "Printer 2", "Offline"
objDictionary.Add "Printer 3", "Printing"


2) Delete All Elements from a Dictionary

Set objDictionary = CreateObject("Scripting.Dictionary")


objDictionary.Add "Printer 1", "Printing"   
objDictionary.Add "Printer 2", "Offline"
objDictionary.Add "Printer 3", "Printing"
colKeys = objDictionary.Keys

Wscript.Echo "First run: "
For Each strKey in colKeys
    Wscript.Echo strKey
Next

objDictionary.RemoveAll
colKeys = objDictionary.Keys

Wscript.Echo VbCrLf & "Second run: "
For Each strKey in colKeys
    Wscript.Echo strKey
Next

3) Delete One Element from a Dictionary

Set objDictionary = CreateObject("Scripting.Dictionary")


objDictionary.Add "Printer 1", "Printing"
objDictionary.Add "Printer 2", "Offline"
objDictionary.Add "Printer 3", "Printing"


colKeys = objDictionary.Keys


Wscript.Echo "First run: "
For Each strKey in colKeys
Wscript.Echo strKey
Next


objDictionary.Remove("Printer 2")
colKeys = objDictionary.Keys


Wscript.Echo VbCrLf & "Second run: "
For Each strKey in colKeys
Wscript.Echo strKey
Next

4) List the Number of Items in a Dictionary

Set objDictionary = CreateObject("Scripting.Dictionary")

objDictionary.Add "Printer 1", "Printing"   
objDictionary.Add "Printer 2", "Offline"
objDictionary.Add "Printer 3", "Printing"
Wscript.Echo objDictionary.Count

5) Verify the Existence of a Dictionary Key

Set objDictionary = CreateObject("Scripting.Dictionary")

objDictionary.Add "Printer 1", "Printing"
objDictionary.Add "Printer 2", "Offline"
objDictionary.Add "Printer 3", "Printing"

If objDictionary.Exists("Printer 4") Then
Wscript.Echo "Printer 4 is in the Dictionary."
Else
Wscript.Echo "Printer 4 is not in the Dictionary."
End If

Jigar Gosai Email: jigar.gosai@gmail.com

VB Script Properties

VB Script Properties
VB Script Properties

VB Script Classes
Creating Classes


Classes aren't a new concept in scripting. JavaScript, JScript, and other scripting languages have supported classes or similar elements for years. However, VBScript 5.0 is the first version of VBScript to support classes.

To use classes in your VBScript code, you first need to obtain VBScript 5.0 by downloading the appropriate self-executable file from the Microsoft Developer Network (MSDN) Web site (http://msdn.microsoft.com/scripting) or by installing Microsoft Internet Explorer (IE) 5.0. Then you need to understand what a VBScript class is and learn how to declare, define, initialize, and instantiate a class.


VBScript Classes


VBScript 5.0 supports two types of objects: COM objects and Class objects (typically referred to as simply classes). VBScript COM objects have basic subtypes, such as an Integer or String. VBScript classes have an abstract subtype that encapsulates data and the functions to work with that data. You can think of a VBScript class as having a souped-up subtype that provides you with more computing power and flexibility. (Other differences exist between these two types of objects. For more information, see the Web-exclusive sidebar "How VBScript Classes and COM Objects Differ" on the Win32 Scripting Journal Web site at http://www.winntmag.com/ newsletter/scripting.


You can use classes to describe complex data structures. For example, if your application tracks customers and orders, you can define two classes for them, each with a unique set of internal data (typically called properties) and functions (typically called methods). You can then manage customers and orders as if they were native VBScript subtypes. More important, because you assign a class its properties and methods (i.e., its programming interface), you have an object-oriented tool to improve VBScript applications.


Declaring a Class


You use the Class statement to declare a class. This statement's syntax is:

Class name
' Properties and methods go here.
End Class
where name is the name you give that class. You declare the properties and methods for your class between the Class and End Class clauses.


For example, suppose you want to create the VBScript class FileList, which Listing 1 contains. This class manages those files in a folder that meet a filename specification that you provide. You create this class by first specifying the keyword Class followed by the class' name Class FileList. Next, you declare the class' properties and methods. FileList has two properties (FileSpec and FolderPath) and one method (Search).


Declaring the FileSpec Property


The FileSpec property holds the filename specification. For example, the filename specification might be C:\*.*. You want users to be able to freely read and write values to this property, so you declare FileSpec as an external, or public, variable with the Public statement


Public FileSpec

You can use a public variable in any script, not just the script in which you created the variable. However, if you use a public variable, you have no control over the value that users assign to the variable and no control over the value that the variable returns. Thus, you can't use public variables to hold values that you need to validate.


Declaring the FolderPath Property


The FolderPath property holds the full path to the folder containing the files. After a user sets a folder path, you need to validate that the folder exists, which means you can't use a public variable. Instead, you need to store the folder path in an internal, or private, variable and use two public property procedures to read and write to that variable. (Public property procedures are wrappers that hide the code that gets and sets the values of private variables.)


Prefixing a private variable with the m_ string is a common scripting convention. For example, the private variable for the FolderPath property is m_folderPath. To declare m_folderPath, you use the Private statement


Private m_folderPath


Procedures and variables that have the Private qualifier aren't visible outside the class. In addition, private variables apply only to the script in which you created them.


After you declare m_folderPath, you need to declare the two public property procedures that you'll use to read and write to that variable. The first procedure to declare is the Property Get procedure, which returns the values of properties. The second procedure is the Property Let procedure, which assigns values to properties.


To declare the Property Get procedure, you use the Property Get statement


Public Property Get FolderPath
FolderPath = m_folderPath
End Property
where FolderPath is the name of that procedure. By including the Public statement with the Property Get statement, you're making the value that the FolderPath procedure returns available for public reading. Thus, by assigning FolderPath to m_folderPath, you make the value of m_folderPath available for public reading.

Wednesday, June 9, 2010

Dynamic handling of object Repositories in QTP

Dynamic handling of object Repositories
Dynamic handling of object Repositories


Loading repositories during running, finding path of the repositories and removing repositories is called Dynamic Handling of Object Repositories.


Using this feature we can increase QTP performance. To do this, QTP is providing an object called “RepositoriesCollection”.

By Jigar Gosai
Email: jigar.gosai@gmail.com


Syntax for Loading a Repository:
RepositoriesCollection.Add “Path of the Repository File”


Syntax for finding Position of the Repository:
Variable=RepositoriesCollection.Find(“Path of the Repository”)


Syntax for Removing the Repository:
RepositoriesCollection.Remove(position)


Syntax for Removing All Repositories:
RepositoriesCollection.RemoveAll


Example:
RepPath="C:\Documents and Settings\Administrator\My Documents\Login.tsr"
RepositoriesCollection.Add (RepPath)
systemutil.Run "C:\Program Files\HP\QuickTest Professional\samples\flight\app\flight4a.exe"
Dialog("Login").Activate
Dialog("Login").WinEdit("Agent Name:").Set "sudhakar"
Dialog("Login").WinEdit("Password:").Set "mercury"
Dialog("Login").WinButton("OK").Click
pos=RepositoriesCollection.Find(RepPath)
RepositoriesCollection.Remove(pos)
RepositoriesCollection.RemoveAll
***********************************


By Jigar Gosai
Email: jigar.gosai@gmail.com


Cloud Testing
Cloud Testing

ISTQB Certification
ISTQB Sample Paper - 3
ISTQB Sample Paper - 2
ISTQB Sample Paper - 1

QC Certification
QTPCertification Sample Paper (HP0-M15) Dumps


QTP Certification
QTP Certification Sample Paper (HP0-M16) Dumps

QTP Interview Questions and Answers
QTP Interview Questions and Answers - 1
QTP Interview Questions and Answers - 2
QTP Interview Questions and Answers - 3
QTP Interview Questions and Answers - 4
QTP Interview Questions and
Answers - 5

QTP Interview Questions and Answers - 6

Monday, June 7, 2010

Automation Framework (QTP Framework)

Automation Framework (QTP Framework):
By Jigar Gosai
Email: jigar.gosai@gmail.com


Automation Framework
Automation Framework (QTP Framework):


Accessing one Software Objects from another Software is called Automation.
(AUT is one s/w and Testing Tool is another s/w.)

Automation Framework:
It is a set of guidelines, assumptions and process developed by experts in order to perform a task(s) in an effective, efficient and optimized way.

A systematic approach for automating software applications.


Why Automation Framework:
In one project test automation we use various files, we perform various tasks, in order to organize and manage them all, a systematic approach (Automation Framework) required.


files to be used:
a) Flat files (.txt),
b) Excel files (.xls)
c) Object repository files (.tsr)
d) XML files (.xml)
e) Library files (.vbs)
f) Test Scripts (.mts)
g) Test Batch Files (.mtb)
h) Recovery scenario files (.qrs) Etc…)


Tasks to be performed:
a) Analyzing the application
b) Selecting Areas/Test Cases for Automation
c) Planning (Effort estimation,Schedule,Work allocation and Automation Framework implementation)
d) Creating Generic and project specific functions.
e) Creating required Automation resources(Functions,Object repository Files,Environment variable files---etc)
f) Creating Tests(Using Object Repository or Descriptive Programming)
g) Enhancing Tests(Inserting Checkpoints,Output Values,Transaction points,Flow Control Statements,Synchronization,Parametrization---etc )
h) Debugging and running tests(Individual test execution,Test Batch execution --etc)
i) Defining and exporting test results
j) Analyzing results
k) Test reporting
l) Defect Reporting using companies defect management system.
m) Modifying tests
n) Performing re and regression testing ---etc

Types Of Automation Framework:
Automation Framework is not a qtp feature, it’s a 3rd party concept. And this is purely local concept.(framework may vary from one company to another)

By Jigar Gosai
Email: jigar.gosai@gmail.com


1. Record/Playback or Linear Framework (1st generation framework).
In this Framework we create tests using recording,low resources maintenance, Form batches and executing tests.
Drawbacks: Modifications and maintanance are difficult,less command on scripts,low performance ---etc

2. Modular Framework.
In this Framework,reusable components can be recognized,first we concentrate on creating reusable components, then creating tests using those components.

Advantages:

It reduces test Automation time

Performance is high than recording and playback

Drawbacks:
Less usage of keywords,no concentration on Data driven testing and low performance than latest Frameworks like Keyword Driven Framework.

3. Data Driven Framework

In this Framework,we concentrate more on Data Driven testing.We recognize positive and negative scenarios,then collecting test data and parameterizing.

Advantages:

We can check reliability of the system,positive and negative testing.

Drawbacks:
Less concentration on complex Functionality Testing and low keywords usage.

4. Keyword Driven framework


5. Hybrid Framework


In the above frameworks Keyword Driven framework is very famous in the industry.
It is a mixing of more than one approach.

In this approach,we mix Data driven and Modular approaches OR Data Driven and Keyword Driven approaches---etc

Advantages:

Scope is very high as we mix different approaches,Flexible for performing any tasks.

Drawbacks:

Organizing and managing resources are difficult,complex architecture,low in performance.

NOTE: Now a days Mix of Data driven and Keyword driven approaches is a famous Hybrid Framework in the industry.

Keyword Driven Framework

Keyword:


1. Any word used as the key to a code


2 A reserved word used to identify a specific command, function etc.


(in our test automation example keywords are :

By Jigar Gosai
Email: jigar.gosai@gmail.com


Keywords to be used in Test Automation:

a) Test Objects (EX: Browser,page,webEdit,WinButton---etc)
b) Functions (Built-In and User defined)
c) Methods (Ex:Set,Select,Activate,Navigate---etc)
d) Statements (EX:Dim,If,For---etc)
e) Operators (EX: +,/,*,and,or,not---etc)

Keyword Driven Approach:
In this approach we use keywords for preparing tests. First we create tests and make them as functions, through framework we execute them and generate results.


Key elements of Automation Framework:
1. Well defined folder structure
2. Initialization script
3. Driver script
4. input data spreadsheet
5. process guidelines document


Why folder structure?
In order to create, store, organize and manage files a well defined folder structure required. Folder structure is a mandatory element of any framework, but folder names may vary from one framework to another and company to another .


Folder Structure:
1. Object Repository
2. Environment
3. Library
a) Company
b) Project Specific
4. Test data
5. Test log
6. Recovery scenarios
7. Miscellaneous

And

1. Initialization script (.vbs file)
2. Driver script (QTP Script file)

By Jigar Gosai
Email: jigar.gosai@gmail.com


1) Object Repository: In this folder we store object repository files(.tsr), all team members can use this repositories.
2) Environment: In this folder we store environment variables files(.xml), all team members can use this variables.
3) Function Library:this folder contains two sub folders one is for storing common functions of our company, another folder for storing our project specific functions(.vbs).
4) Test Data: in this folder we store test data required for data driven testing, for that we use either .xls files or .txt files or .mdb files.
5) Test Log: In this folder we store test result(excel sheet).
6) Recovery scenarios: In this folder we store qtp recovery scenarios files(.qrs).
7) Miscellaneous: in this folder we store the files other than above files(ex-process guideline doc and messages among team members and instructions by team lead etc).

And

1) Initialization script (.vbs file):
It launches qtp tool and calls driver script, at end it closes qtp tool.
2) Driver script (QTP Script file):
It is only the qtp script, we can associate all resources to this script(ex)

By Jigar Gosai
Email: jigar.gosai@gmail.com


By Jigar Gosai
Email: jigar.gosai@gmail.com


Cloud Testing
Cloud Testing

ISTQB Certification
ISTQB Sample Paper - 3
ISTQB Sample Paper - 2
ISTQB Sample Paper - 1

QC Certification
QTPCertification Sample Paper (HP0-M15) Dumps


QTP Certification
QTP Certification Sample Paper (HP0-M16) Dumps

QTP Interview Questions and Answers - 1
QTP Interview Questions and Answers - 1
QTP Interview Questions and Answers - 2
QTP Interview Questions and Answers - 3
QTP Interview Questions and Answers - 4
QTP Interview Questions and
Answers - 5

QTP Interview Questions and Answers - 6

By Jigar Gosai
Email: jigar.gosai@gmail.com

Monday, April 19, 2010

QTP Interview Questions and Answers - 6

21. What the differences are and best practical application of each.

Per Action Repository: For Each Action, one Object Repository is created.
Shared Repository: One Object Repository is used by entire application

22. Explain what the difference between Shared Repository and Per_Action Repository

Shared Repository: Entire application uses one Object Repository , that similar to Global GUI Map file in WinRunner
Per Action Repository: For each Action ,one Object Repository is created, like GUI map file per test in WinRunner

23. Have you ever written a compiled module? If yes tell me about some of the functions that you wrote.

I Used the functions for Capturing the dynamic data during runtime. Function used for Capturing Desktop, browser and pages.





24. What projects have you used WinRunner on? Tell me about some of the challenges that arose and how you handled them.

pbs :WR fails to identify the object in gui. If there is a non std window obk wr cannot recognize it ,we use GUI SPY for that to handle such situation.

25. Can you do more than just capture and playback?

I have done Dynamically capturing the objects during runtime in which no recording, no playback and no use of repository is done AT ALL.
-It was done by the windows scripting using the DOM(Document Object Model) of the windows.

27. 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.

28. What is the difference between check point and output value in QTP.

It is as follows:-
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]

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

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

30. 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 .......

31. 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.

32. How do you data drive an external spreadsheet?

u can use the foll. statements in QTP:
DataTable.ImportSheet "..\..\TestData\Input.xls",1,dtGlobalSheet
DataTable.ExportSheet "..\..\Results\Output.xls","Global"

for importing a file:

DataTable.Import "filename.txt"

(you have to write the path name also for eg:
DataTable.Import "C:\Documents and
Settings\mercury\Desktop\fly.txt")

for Exporting a file:

Dim fso, MyFile
Set fso = CreateObject("Scripting.FileSystemObject")

Set MyFile = fso.CreateTextFile("fileName.txt",True)

(Eg:Set MyFile = fso.CreateTextFile("C:\Documents and Settings\mercury\Desktop\flight.txt",True)

MyFile.WriteLine("Fly_From"&" "&"Fly_To"&" "&"Order_No"&" "&" Flight" )


C1=DataTable.Value(1,1)&" "
C2=DataTable.Value(2,1)&" "
C3=DataTable.Value(3,1)&" "
c4=DataTable.Value(4,1)
B=C1&C2&C3&c4
MyFile.WriteLine(B)

This is just an example
Note: To get the contents in diff column in Excel sheet give tab.

33. 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.

By Jigar Gosai
Email: jigar.gosai@gmail.com


Cloud Testing
Cloud Testing

ISTQB Certification
ISTQB Sample Paper - 3
ISTQB Sample Paper - 2
ISTQB Sample Paper - 1

QC Certification
QTPCertification Sample Paper (HP0-M15) Dumps


QTP Certification
QTP Certification Sample Paper (HP0-M16) Dumps

QTP Interview Questions and Answers - 1
QTP Interview Questions and Answers - 1
QTP Interview Questions and Answers - 2
QTP Interview Questions and Answers - 3
QTP Interview Questions and Answers - 4
QTP Interview Questions and
Answers - 5

QTP Interview Questions and Answers - 6

By Jigar Gosai
Email: jigar.gosai@gmail.com

QTP Interview Questions and Answers - 5

By Jigar Gosai
Email: jigar.gosai@gmail.com


1. What are the Features & Benefits of Quick Test Pro(QTP)..?

1. Key word driven testing
2. Suitable for both client server and web based application
3. Vb script as the script language
4. Better error handling mechanism
5. Excellent data driven testing features

2. Where can I get Quck Test pro(QTP Pro) software.. This is Just for Information purpose Only.

Download QTP. Click Here

3. How to handle the exceptions using recovery secnario manager in Qtp?

You can instruct QTP to recover unexpected events or errors that occured in your testing environment during test run. Recovery scenario manager provides a wizard that guides you through the defining recovery scenario. Recovery scenario has three steps
1. Triggered Events
2. Recovery steps
3. Post Recovery Test-Run

4. what is the use of Text output value in Qtp?

Output values enable to view the values that the application talkes during run time.When paramaterised, the values change for each iteration.Thus by creating output values, we can capture the values that the application takes for each run and output them to the data table.





5. How to use the Object spy?

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.

Cloud Testing
Cloud Testing

ISTQB Certification
ISTQB Sample Paper - 3
ISTQB Sample Paper - 2
ISTQB Sample Paper - 1

QC Certification
QTPCertification Sample Paper (HP0-M15) Dumps


QTP Certification
QTP Certification Sample Paper (HP0-M16) Dumps

QTP Interview Questions and Answers - 1
QTP Interview Questions and Answers - 1
QTP Interview Questions and Answers - 2
QTP Interview Questions and Answers - 3
QTP Interview Questions and Answers - 4
QTP Interview Questions and Answers - 5

By Jigar Gosai
Email: jigar.gosai@gmail.com


6. 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

7. 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.

8. 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")....

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

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

11. Few basic questions on commonly used Excel VBA functions in QTP.
common functions are:
Coloring the cell
Auto fit cell
setting navigation from link in one cell to other
saving

12. Explain the keyword createobject in QTP 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.

13. Explain in brief about the QTP Automation Object Model.

Essentially all configuration and run functionality provided via the QuickTest interface is in some way represented in the QuickTest automation object model via objects, methods, and properties. Although a one-on-one comparison cannot always be made, most dialog boxes in QuickTest have a corresponding automation object, most options in dialog boxes can be set and/or retrieved using the corresponding object property, and most menu commands and other operations have corresponding automation methods. You can use the objects, methods, and properties exposed by the QuickTest automation object model, along with standard programming elements such as loops and conditional statements to design your program.

14. 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.

Cloud Testing
Cloud Testing

ISTQB Certification
ISTQB Sample Paper - 3
ISTQB Sample Paper - 2
ISTQB Sample Paper - 1

QC Certification
QTPCertification Sample Paper (HP0-M15) Dumps


QTP Certification
QTP Certification Sample Paper (HP0-M16) Dumps

QTP Interview Questions and Answers - 1
QTP Interview Questions and Answers - 1
QTP Interview Questions and Answers - 2
QTP Interview Questions and Answers - 3
QTP Interview Questions and Answers - 4
QTP Interview Questions and Answers - 5

By Jigar Gosai
Email: jigar.gosai@gmail.com


15. 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.

16. How does Parametrization and Data-Driving relate to each other in QTP?

To datadrive 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 datatable. 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 suggestable, & it's also of no use.

17. What is the difference between Call to Action and Copy Action.?

Call to Action : The changes made in Call to Action , will be reflected in the orginal 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)

18. Discuss QTP Environment.

QuickTest Pro environment using the graphical interface and ActiveScreen technologies - A testing process for creating test scripts, relating manual test requirements to automated verification features - Data driving to use several sets of data using one test script.

19. Explain the concept of how QTP identifies object.

During recording qtp looks at the object and stores it as test object.For each test object QT learns a set of default properties called mandatory properties,and look at the rest of the objects to check whether this properties are enough to uniquely identify the object. During test run,QT searches for the run time obkects that matches with the test object it learned while recording.

20. Differentiate the two Object Repository Types of QTP.

Object repository is used to store all the objects in the application being tested.2 types of object repositoy per action and shared. In shared repository only one centralized repository for all the tests. where as in per action.for each test a separate per action repository is created.


Cloud Testing
Cloud Testing

ISTQB Certification
ISTQB Sample Paper - 3
ISTQB Sample Paper - 2
ISTQB Sample Paper - 1

QC Certification
QTPCertification Sample Paper (HP0-M15) Dumps


QTP Certification
QTP Certification Sample Paper (HP0-M16) Dumps

QTP Interview Questions and Answers - 1
QTP Interview Questions and Answers - 1
QTP Interview Questions and Answers - 2
QTP Interview Questions and Answers - 3
QTP Interview Questions and Answers - 4
QTP Interview Questions and Answers - 5

By Jigar Gosai
Email: jigar.gosai@gmail.com

Wednesday, April 14, 2010

QTP Interview Questions and Answers - 2

QTP Interview Questions and Answers - 2

By Jigar Gosai
Email: jigar.gosai@gmail.com


1. What are the features and benefits of Quick Test Pro(QTP)?
1. Key word driven testing
2. Suitable for both client server and web based application
3. VB script as the script language
4. Better error handling mechanism
5. Excellent data driven testing features







2. How to handle the exceptions using recovery scenario manager in QTP?
You can instruct QTP to recover unexpected events or errors that occurred in your testing environment during test run. Recovery scenario manager provides a wizard that guides you through the defining recovery scenario. Recovery scenario has three steps
1. Triggered Events
2. Recovery steps
3. Post Recovery Test-Run

3. What is the use of Text output value in QTP?
Output values enable to view the values that the application talks during run time. When parameterized, the values change for each iteration. Thus by creating output values, we can capture the values that the application takes for each run and output them to the data table.

4. 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) Thru 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 minimized then hold the Ctrl button and activate the required window to and release the Ctrl button.

By Jigar Gosai
Email: jigar.gosai@gmail.com


5. What is the file extension of the code file and object repository file in QTP?
File extension of
Per test object rep: filename.mtr
Shared Object rep: filename.tsr
Code file extension id: script.mts

6. Explain the concept of object repository and how QTP recognizes 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 on the page or in the source code.

7. What are the properties you would use for identifying a browser and 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”)

8. What are the different scripting languages you could use when working with QTP?
You can write scripts using following languages:
Visual Basic (VB), XML, JavaScript, Java, HTML

9. Tell some commonly used Excel VBA functions.
Common functions are:
Coloring the cell, Auto fit cell, setting navigation from link in one cell to other saving

10. 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.

By Jigar Gosai
Email: jigar.gosai@gmail.com


11. Explain in brief about the QTP Automation Object Model.
Essentially all configuration and run functionality provided via the QuickTest interface is in some way represented in the QuickTest automation object model via objects, methods, and properties. Although a one-on-one comparison cannot always be made, most dialog boxes in QuickTest have a corresponding automation object, most options in dialog boxes can be set and/or retrieved using the corresponding object property, and most menu commands and other operations have corresponding automation methods. You can use the objects, methods, and properties exposed by the QuickTest automation object model, along with standard programming elements such as loops and conditional statements to design your program.

12. 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 recognize 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 out this:
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.

13. 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 table.
-This is basically an excel file, which is stored in the folder of the test created, its name is Default.xls by default.

14. How does Parameterization and Data-Driving relate to each other in QTP?
To data driven we have to parameterize. i.e. we have to make the constant value as parameter, so that in each interaction(cycle) it takes a value that is supplied in run-time data table. Through parameterization 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 suggested, and it’s also of no use.

15. What is the difference between Call to Action and Copy Action.?
Call to 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)

By Jigar Gosai
Email: jigar.gosai@gmail.com


16. Explain the concept of how QTP identifies object.
During recording qtp looks at the object and stores it as test object. For each test object QT learns a set of default properties called mandatory properties, and look at the rest of the objects to check whether this properties are enough to uniquely identify the object. During test run, QTP searches for the run time objects that matches with the test object it learned while recording.

17. Differentiate the two Object Repository Types of QTP.
Object repository is used to store all the objects in the application being tested.
Types of object repository: Per action and shared repository.
In shared repository only one centralized repository for all the tests. where as in per action for each test a separate per action repository is created.

18. What the differences are and best practical application of Object Repository?
Per Action: For Each Action, one Object Repository is created.
Shared: One Object Repository is used by entire application

19. Explain what the difference between Shared Repository and Per Action Repository?
Shared Repository: Entire application uses one Object Repository , that similar to Global GUI Map file in WinRunner
Per Action: For each Action, one Object Repository is created, like GUI map file per test in WinRunner

20. Have you ever written a compiled module? If yes tell me about some of the functions that you wrote.
Sample answer (You can tell about modules you worked on. If your answer is Yes then You should expect more questions and should be able to explain those modules in later questions): I Used the functions for Capturing the dynamic data during runtime. Function used for Capturing Desktop, browser and pages.

By Jigar Gosai
Email: jigar.gosai@gmail.com


21. Can you do more than just capture and playback?
Sample answer (Say Yes only if you worked on): I have done Dynamically capturing the objects during runtime in which no recording, no playback and no use of repository is done AT ALL.
-It was done by the windows scripting using the DOM(Document Object Model) of the windows.

22. How to do the scripting. Are there any inbuilt functions in QTP? What is 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 you enter the appropriate steps.

23. 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]

24. 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.

25. I want to open a Notepad window without recording a test and I do not want to use System utility Run command as well. How do I do this?
You 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.


Cloud Testing
Cloud Testing

ISTQB Certification
ISTQB Sample Paper - 3
ISTQB Sample Paper - 2
ISTQB Sample Paper - 1

QC Certification
QTPCertification Sample Paper (HP0-M15) Dumps


QTP Certification
QTP Certification Sample Paper (HP0-M16) Dumps

QTP Interview Questions and Answers - 1
QTP Interview Questions and Answers - 1
QTP Interview Questions and Answers - 2

By Jigar Gosai
Email: jigar.gosai@gmail.com

Tuesday, April 13, 2010

QTP interview questions and answers - 1

By Jigar Gosai
Email: jigar.gosai@gmail.com

QTP interview questions and answers - 1
1. What are the Features & Benefits of Quick Test Pro (QTP 8.0)? -
Operates stand-alone, or integrated into Mercury Business Process Testing and Mercury Quality Center. Introduces next-generation zero-configuration Keyword Driven testing technology in Quick Test Professional 8.0 allowing for fast test creation, easier maintenance, and more powerful data-driving capability. Identifies objects with Unique Smart Object Recognition, even if they change from build to build, enabling reliable unattended script execution. Collapses test documentation and test creation to a single step with Auto-documentation technology. Enables thorough validation of applications through a full complement of checkpoints.





2. How to handle the exceptions using recovery scenario manager in QTP?
- There are 4 trigger events during which a recovery scenario should be activated. A pop up window appears in an opened application during the test run: A property of an object changes its state or value, A step in the test does not run successfully, An open application fails during the test run, These triggers are considered as exceptions.You can instruct QTP to recover unexpected events or errors that occurred in your testing environment during test run. Recovery scenario manager provides a wizard that guides you through the defining recovery scenario. Recovery scenario has three steps: 1. Triggered Events 2. Recovery steps 3. Post Recovery Test-Run
3. What is the use of Text output value in QTP?
- Output values enable to view the values that the application talks during run time. When parameterized, the values change for each iteration. Thus by creating output values, we can capture the values that the application takes for each run and output them to the data table.
4. 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) True Object repository Dialog, In Object repository 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 minimized then, hold the Ctrl button and activate the required window to and release the Ctrl button.
5. How Does Run time data (Parameterization) is handled in QTP?
- You can then enter test data into the Data Table, an integrated spreadsheet with the full functionality of Excel, to manipulate data sets and create multiple test iterations, without programming, to expand test case coverage. Data can be typed in or imported from databases, spreadsheets, or text files.

By Jigar Gosai
Email: jigar.gosai@gmail.com

QTP interview questions and answers - 1

6. What is keyword view and Expert view in QTP?
- Quick Test Professional Keyword Driven approach, test automation experts have full access to the underlying test and object properties, via an integrated scripting and debugging environment that is round-trip synchronized with the Keyword View. Advanced testers can view and edit their tests in the Expert View, which reveals the underlying industry-standard VBScript that Quick Test Professional automatically generates. Any changes made in the Expert View are automatically synchronized with the Keyword View.
7. Explain about the Test Fusion Report of QTP?
- Once a tester has run a test, a Test Fusion report displays all aspects of the test run: a high-level results overview, an expandable Tree View of the test specifying exactly where application failures occurred, the test data used, application screen shots for every step that highlight any discrepancies, and detailed explanations of each checkpoint pass and failure. By combining Test Fusion reports with Quick Test Professional, you can share reports across an entire QA and development team.
8. Which environments does QTP support?
- Quick Test Professional supports functional testing of all enterprise environments, including Windows, Web,..NET, Java/J2EE, SAP, Siebel, Oracle, PeopleSoft, Visual Basic, ActiveX, mainframe terminal emulators, and Web services.
9. What is QTP?
- Quick Test is a graphical interface record-playback automation tool. It is able to work with any web, java or windows client application. Quick Test enables you to test standard web objects and ActiveX controls. In addition to these environments, Quick Test Professional also enables you to test Java applets and applications and multimedia objects on Applications as well as standard Windows applications, Visual Basic 6 applications and.NET framework applications
10. Explain QTP Testing process?
- Quick Test testing process consists of 6 main phases:
 Create your test plan - Prior to automating there should be a detailed description of the test including the exact steps to follow, data to be input, and all items to be verified by the test. The verification information should include both data validations and existence or state verifications of objects in the application.
 Recording a session on your application - As you navigate through your application, Quick Test graphically displays each step you perform in the form of a collapsible icon-based test tree. A step is any user action that causes or makes a change in your site, such as clicking a link or image, or entering data in a form.
 Enhancing your test - Inserting checkpoints into your test lets you search for a specific value of a page, object or text string, which helps you identify whether or not your application is functioning correctly. NOTE: Checkpoints can be added to a test as you record it or after the fact via the Active Screen. It is much easier and faster to add the checkpoints during the recording process. Broadening the scope of your test by replacing fixed values with parameters lets you check how your application performs the same operations with multiple sets of data. Adding logic and conditional statements to your test enables you to add sophisticated checks to your test.
 Debugging your test - If changes were made to the script, you need to debug it to check that it operates smoothly and without interruption.
 Running your test on a new version of your application - You run a test to check the behavior of your application. While running, Quick Test connects to your application and performs each step in your test.
 Analyzing the test results - You examine the test results to pinpoint defects in your application.
 Reporting defects - As you encounter failures in the application when analyzing test results, you will create defect reports in Defect Reporting Tool.

By Jigar Gosai
Email: jigar.gosai@gmail.com

QTP interview questions and answers - 1

11. Explain the QTP Tool interface.
- It contains the following key elements: Title bar, displaying the name of the currently open test, Menu bar, displaying menus of Quick Test commands, File toolbar, containing buttons to assist you in managing tests, Test toolbar, containing buttons used while creating and maintaining tests, Debug toolbar, containing buttons used while debugging tests. Note: The Debug toolbar is not displayed when you open Quick Test for the first time. You can display the Debug toolbar by choosing View — Toolbars — Debug. Action toolbar, containing buttons and a list of actions, enabling you to view the details of an individual action or the entire test flow. Note: The Action toolbar is not displayed when you open Quick Test for the first time. You can display the Action toolbar by choosing View — Toolbars — Action. If you insert a reusable or external action in a test, the Action toolbar is displayed automatically. Test pane, containing two tabs to view your test-the Tree View and the Expert View ,Test Details pane, containing the Active Screen. Data Table, containing two tabs, Global and Action, to assist you in parameterizing your test. Debug Viewer pane, containing three tabs to assist you in debugging your test-Watch Expressions, Variables, and Command. (The Debug Viewer pane can be opened only when a test run pauses at a breakpoint.) Status bar, displaying the status of the test
12. How does QTP recognize Objects in AUT?
- Quick Test stores the definitions for application objects in a file called the Object Repository. As you record your test, Quick Test will add an entry for each item you interact with. Each Object Repository entry will be identified by a logical name (determined automatically by Quick Test), and will contain a set of properties (type, name, etc) that uniquely identify each object. Each line in the Quick Test script will contain a reference to the object that you interacted with, a call to the appropriate method (set, click, check) and any parameters for that method (such as the value for a call to the set method). The references to objects in the script will all be identified by the logical name, rather than any physical, descriptive properties.
13. What are the types of Object Repositories in QTP?
- Quick Test has two types of object repositories for storing object information: shared object repositories and action object repositories. You can choose which type of object repository you want to use as the default type for new tests, and you can change the default as necessary for each new test. The object repository per-action mode is the default setting. In this mode, Quick Test automatically creates an object repository file for each action in your test so that you can create and run tests without creating, choosing, or modifying object repository files. However, if you do modify values in an action object repository, your changes do not have any effect on other actions. Therefore, if the same test object exists in more than one action and you modify an object’s property values in one action, you may need to make the same change in every action (and any test) containing the object.
14. Explain the check points in QTP?
- A checkpoint verifies that expected information is displayed in an Application while the test is running. You can add eight types of checkpoints to your test for standard web objects using QTP. A page checkpoint checks the characteristics of an Application. A text checkpoint checks that a text string is displayed in the appropriate place on an Application. An object checkpoint (Standard) checks the values of an object on an Application. An image checkpoint checks the values of an image on an Application. A table checkpoint checks information within a table on a Application. An Accessibilityy checkpoint checks the web page for Section 508 compliance. An XML checkpoint checks the contents of individual XML data files or XML documents that are part of your Web application. A database checkpoint checks the contents of databases accessed by your web site
15. In how many ways we can add check points to an application using QTP?
- We can add checkpoints while recording the application or we can add after recording is completed using Active screen (Note : To perform the second one The Active screen must be enabled while recording).
By Jigar Gosai
Email: jigar.gosai@gmail.com

QTP interview questions and answers - 1

16. How does QTP identify objects in the application?
- QTP identifies the object in the application by Logical Name and Class.
17. What is Parameterizing Tests?
- When you test your application, you may want to check how it performs the same operations with multiple sets of data. For example, suppose you want to check how your application responds to ten separate sets of data. You could record ten separate tests, each with its own set of data. Alternatively, you can create a parameterized test that runs ten times: each time the test runs, it uses a different set of data.
18. What is test object model in QTP?
- The test object model is a large set of object types or classes that Quick Test uses to represent the objects in your application. Each test object class has a list of properties that can uniquely identify objects of that class and a set of relevant methods that Quick Test can record for it. A test object is an object that Quick Test creates in the test or component to represent the actual object in your application. Quick Test stores information about the object that will help it identify and check the object during the run session.
19. What is Object Spy in QTP?
- Using the Object Spy, you can view the properties of any object in an open application. You use the Object Spy pointer to point to an object. The Object Spy displays the selected object’s hierarchy tree and its properties and values in the Properties tab of the Object Spy dialog box.
20. 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. Quick Test 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.
By Jigar Gosai
Email: jigar.gosai@gmail.com

QTP interview questions and answers - 1
21. 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, Quick Test 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 Quick Test 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 Quick Test generate a random number and insert it in a number of tickets edit field.
22. 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 Test set from the Execution Grid. The same is possible with QTP also. If our test cases are automated then by selecting Run Test set 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.
23. If I give some thousand tests to execute in 2 days what do u do?
- Adhoc testing is done. It Covers the least basic functionalities to verify that the system is working fine.
24. 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 cause for failure whether it is a Script Issue or Environment Issue or a Application issue.
25. What is Object Spy in QTP?
- Using the Object Spy, you can view the properties of any object in an open application. You use the Object Spy pointer to point to an object. The Object Spy displays the selected object’s hierarchy tree and its properties and values in the Properties tab of the Object Spy dialog box.
By Jigar Gosai
Email: jigar.gosai@gmail.com

QTP interview questions and answers - 1
26. What is the file extension of the code file & object repository file in QTP?
- Code file extension is.vbs and object repository is.tsr
27. Explain the concept of object repository & how QTP recognizes 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 Ordinal identifier such as objects location on the page or in the source code.
28. 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.
29. Give me an example where you have used a COM interface in your QTP project?
- com interface appears in the scenario of front end and back end. for eg:if you r using oracle as back end and front end as VB or any language then for better compatibility we will go for an interface. of which COM will be one among those interfaces. Create object creates handle to the instance of the specified object so that we program can use the methods on the specified object. It is used for implementing Automation(as defined by Microsoft).
30. Explain in brief about the QTP Automation Object Model.
- Essentially all configuration and run functionality provided via the Quick Test interface is in some way represented in the Quick Test automation object model via objects, methods, and properties. Although a one-on-one comparison cannot always be made, most dialog boxes in Quick Test have a corresponding automation object, most options in dialog boxes can be set and/or retrieved using the corresponding object property, and most menu commands and other operations have corresponding automation methods. You can use the objects, methods, and properties exposed by the Quick Test automation object model, along with standard programming elements such as loops and conditional statements to design your program.

Cloud Testing
Cloud Testing

ISTQB Certification
ISTQB Sample Paper - 3
ISTQB Sample Paper - 2
ISTQB Sample Paper - 1

QC Certification
QTPCertification Sample Paper (HP0-M15) Dumps


QTP Certification
QTP Certification Sample Paper (HP0-M16) Dumps

Wednesday, April 7, 2010

Performance Test Plan







What to include in a performance test plan?

Before performance testing can be performed effectively, a detailed plan should be formulated that specifies how performance testing will proceed from a business perspective and technical perspective. At a minimum, a performance testing plan needs to address the following:
• Overall approach
• Dependencies and baseline assumptions
• Pre-performance testing actions
• Performance testing approach
• Performance testing activities
• In-scope business processes
• Out-of-scope business processes
• Performance testing scenarios
• Performance test execution
• Performance test metrics
As in any testing plan, try to keep the amount of text to a minimum. Use tables and lists to articulate the information. This will reduce the incidents of miscommunication.

Overall approach:
This section of the performance plan lays out the overall approach for this performance testing engagement in non-technical terms. The target audience is the management and the business. Example:
"The performance testing approach will focus on the business processes supported by the new system implementation. Within the context of the performance testing engagement, we will:
• Focus on mitigating the performance risks for this new implementation.
• Make basic working assumptions on which parts of the implementation need to be performance-tested.
• Reach consensus on these working assumptions and determine the appropriate level of performance and stress testing that shall be completed within this compressed time schedule.


This is a living document, as more information is brought to light, and as we reach consensus on the appropriate performance testing approach, this document will be updated."

Dependencies and baseline assumptions:

This section of the performance test plan articulates the dependencies (tasks that must be completed) and baseline assumptions (conditions testing believes to be true) that must be met before effective performance testing can proceed. Example:
"To proceed with any performance testing engagement the following basic requirements should be met:
• Components to be performance tested shall be completely functional.
• Components to be performance tested shall be housed in hardware/firmware components that are representative or scaleable to the intended production systems.
• Data repositories shall be representative or scaleable to the intended production systems.
• Performance objectives shall be agreed upon, including working assumptions and testing scenarios.
• Performance testing tools and supporting technologies shall be installed and fully licensed."

Pre-performance testing actions:

This section of the performance test plan articulates pre-testing activities that could be performed before formal performance testing begins to ensure the system is ready. It's the equivalent to smoke testing in the functional testing space. Example:
"Several pre-performance testing actions could be taken to mitigate any risks during
performance testing:
• Create a "stubs" or "utilities" to push transactions through the QA environment -– using projected peak loads.
• Create a "stubs" or "utilities" to replace business-to-business transactions that are not going to be tested or will undergo limited performance. This would remove any dependencies on B2B transactions.
• Create a "stubs" or "utilities" to replace internal components that will not be available during performance testing. This would remove any dependencies on these components.
• Implement appropriate performance monitors on all high-volume servers."

Performance testing approach

This section of the performance plan expands on the overall approach, but this time the focus is on the both the business and technical approach. As an example:
"The performance testing approach will focus on a logical view of the new system implementation. Within the context of the performance testing engagement, we will:
• Focus on mitigating the performance risks for this new implementation.
• Make basic working assumptions on which parts of the implementation need to be performance-tested.
• Reach consensus on these working assumptions and determine the appropriate level of performance that shall be completed.
• Use a tier 1 performance testing tool that can replicate the expected production volumes.
• Use an environment that replicates the components (as they will exist in production) that will be performance-tested -– noting all exceptions.
• Use both production and non-production (testing) monitors to measure the performance of the system during performance testing."

Performance testing activities

This section of the performance test plan specifies the activities that will occur during performance testing. Example:
"During performance testing the following activities shall occur:
• Performance test shall create appropriate loads against the system following agreed-upon scenarios that include:
o User actions (workflow)
o Agreed-upon loads (transactions per minute)
o Agreed-upon metrics (response times)
• Manual testing and automated functional tests shall be conducted during performance testing to ensure that user activities are not impacted by the current load.
• System monitors shall be used to observe the performance of all servers involved in the test to ensure they meet predefined performance requirements.
• Post-implementation support teams shall be represented during performance testing to observe and support the performance testing efforts."

In-scope business processes
This section of the performance test plan speaks to which aspects of the system are deemed to be in-scope (measured). Example:
"The following business processes are considered in-scope for the purposes of performance testing:
• User registration
• Logon/access
• Users browsing content
• Article sales & fulfillment
• Billing
Business process list formed in consultation with: Business Analysts, Marketing Analyst, Infrastructure, and Business Owner."

Out-of-scope business processes

This section of the performance testing plan speaks to which aspects of the system are deemed to be out-of-scope (measured). Example:
"Business processes that are considered out-of-scope for the purposes of testing are as follows:
• Credit check
o Assumption: Credit check link shall be hosted by a third party -- therefore no significant performance impact.
• All other business functionality not previously listed as in-scope or out-of-scope
o Assumption: Any business activity not mentioned in the in-scope or out-of-scope sections of this document does not present a significant performance risk to the business."

Formulating performance testing scenarios:
The existence of this section within the body of the performance testing plan depends on the maturity of the organization within the performance testing space. If the organization has little or no experience in this space, then include this section within the plan otherwise include it as an appendix. Example:
"Formulation of performance testing scenarios requires significant inputs from IT and the business:
• Business scenario
o The business scenario starts as a simple textual description of the business workflow being performance-tested.
o The business scenario expands to a sequence of specific steps with well-defined data requirements.
o The business scenario is complete once IT determines what (if any) additional data requirements are required because of the behavior of the application/servers (i.e. caching).
• Expected throughput (peak)
o The expected throughput begins with the business stating how many users are expected to be performing this activity during peak and non-peak hours.
o The expected throughput expands to a sequence of distinguishable transactions that may (or may not) be discernable to the end user.
o The expected throughput is completed once IT determines what (if any) additional factors could impact the load (i.e. load-balancing)
• Acceptance performance criteria (acceptable response times under various loads)
o Acceptance performance criteria are stated by the business in terms of acceptable response times under light, normal and heavy system load. System load being day-in-the-life activity. These could be simulated by other performance scenarios.
o The performance testing team then restates the acceptance criteria in terms of measurable system events. These criteria are then presented to the business for acceptance.
o The acceptance criteria are completed once IT determines how to monitor system performance during the performance test. This will include metrics from the performance testing team.
• Data requirements (scenario and implementation specific)
o The business specifies the critical data elements that would influence the end-user experience.
o IT expands these data requirements to include factors that might not be visible to the end user, such as caching.
o The performance testing team working with IT and the business creates the necessary data stores to support performance testing."

Performance test execution

Once again the existence of this section of the performance test plan is dependent upon the maturity of the organization within the performance testing space. If the organization has significant performance testing experience, then this section can become a supporting appendix. Example:
"Performance testing usually follows a linear path of events:
• Define performance-testing scenarios.
• Define day-in-the-life loads based on the defined scenarios.
• Execute performance tests as standalone tests to detect issues within a particular business workflow.
• Execute performance scenarios as a "package" to simulate day-in-the-life activities that are measured against performance success criteria.
• Report performance testing results.
• Tune the system.
• Repeat testing as required."

Performance test metrics:
The performance test metrics need to track against acceptance performance criteria formulated as part of the performance testing scenarios. If the organization has the foresight to articulate these as performance requirements, then a performance requirements section should be published within the context of the performance test plan. The most basic performance test metrics consist of measuring response time and transaction failure rate against a given performance load -- as articulated in the performance test scenario. These metrics are then compared to the performance requirements to determine if the system is meeting the business need.

For other Articles refer below links:

Cloud Testing
Cloud Testing

ISTQB Certification
ISTQB Sample Paper - 3
ISTQB Sample Paper - 2
ISTQB Sample Paper - 1

QC Certification
QTPCertification Sample Paper (HP0-M15) Dumps


QTP Certification
QTP Certification Sample Paper (HP0-M16) Dumps

By Jigar Gosai
Email: jigar.gosai@gmail.com