Professional Documents
Culture Documents
Total Testing Meterial
Total Testing Meterial
Project:
Project is some thing that is developed based on the particular customers requirements
and used by that customer only ( E.g.: Marriage laddu)
Product:
It is some thing that is developed based on the companies specification and
used by the multiple customers (e.g.: Thirupathi laddu)
Quality:
Latest definition for quality: - quality is defined as not only the justification of
requirements but also the presence of value (User friendliness)
Testing:
crp.testing@gmail.com 1
Testing is processes, in which the defects are identified, isolated, subjected
for rectification & ensure that the product is defect free. In order to produce the
quality product in the end and hence customer satisfaction.
2. Analysis phase
3. Design phase
4. Coding Phase
5. Testing Phase
(a) Tasks: Interaction with the customer and gathering the requirements.
crp.testing@gmail.com 2
the project. In case of confused requirements he is the responsible for prototype
demonstration and gathering the clear requirements.
5. BD (Business Document)
Some companies may maintain the over all business flow information in one
document and the detailed functional requirement information in the other
document
Templates: It is a pre defined format, which contains the predefined fields, and
used for preparing a document in an easy, comfort and perfect manner.
Prototype: -Defined as a roughly & Rapidly developed model which is used for
demonstrating to the client, In order to gather the clear requirements and to win the
confidence of a customer.
(a) Tasks:
1. Feasibilty Study
2. Tentative planning
3. Technology Selection
4. Requirement Analysis
(b) Roles: System Analyst, Project Manager, and Team Manager.
Process
2. Tentative Planning: In this section the resource planning and the time
planning (scheduling) is done temporarily.
crp.testing@gmail.com 3
3. Technology Selection: - The list of all the technologies that are required
to accomplish this project. Successfully will be analyzed and listed out in this
section.
Roles: High-level designing is done by the chief Architect & Low level
designing is done by the Technical Lead
Process: The Chief architect will be drawing some diagrams using unified
modeling language in order to divide the whole project in to modules.
The Technical lead will also draw some diagrams in order to divide the
modules in to sub modules.
The technical lead will also develop the PSEUDO code in order to make
developers comfortable while de3veloping the actual code.
Process: Developers will develop the actual code by using the technical design
document as well as following the coding standards like Proper indentation, color
coding, proper commenting and etc..,
Process:
1. First of all the test engineers will collect the requirements
document and try to understand all the requirements
5. Once the first build is released then they will execute the
test cases
6. If at all any defects are found. They will list out all of them
in a defect profile template then
8. Once the next build is released then they re-execute the test
cases.
9. If at all any defects are found they will update the profile
document and sent it to the development department and
will be waiting fro the next build to be released.
Test Case: (def) Test case is an idea of a test engineer based on the customer’s
requirements in order to test a particular feature or a function.
crp.testing@gmail.com 5
VI. Delivery & Maintenance Phase:
Delivery:
(a) Task: - Installing the application in the client’s environment
Maintenance:
After delivering the soft ware while using if at all any problem occurs
then that problem becomes a task, based on that problem corresponding roles will
be appointed, the roles will defined the process and solve that problem.
Some clients may request for the continuous maintenance in such situations a
group of people from the software company will be continuously working on the
clients place and taking care of the soft ware.
************************^^^^^^^^^^^^^^^^^^^************************
1. Un-conventional testing
2. Conventional testing
crp.testing@gmail.com 6
Testing Methodology or Testing techniques:
There are three methods of testing
(a) Black-Box Testing: If one performs testing only on the functional part of
an application with out having any structural knowledge then tat method of
testing is known as Black-Box testing, usually the test engineers perform it.
(c) Grey-Box Testing: If one performs testing on both the functional part as
well as the structural part of an application then that method of testing as
known as gray box testing using the test engineers who have structural
knowledge will perform gray- box testing.
Levels of Testing:
There are five levels of testing
The developers may follow one of the following approaches while integrating
the modules.
1. Top-down approach
4. Bigbang approach
1. Top-down approach: - In this approach one will develop the parent modules
first and then integrate them with the related child modules
2. Bottom-up approach: - In this approach one will develop the child modules
first and integrate them to the parent modules
4. Big bang approach:-In this approach one will wait till all the modules are
ready and finally they will integrate all the modules at a time
STUB: - While integrating the modules in top down approach if at all any
mandatory module is missing then that module is replace with a temporary
program known as STUB
crp.testing@gmail.com 8
corresponding modules. It is a black box testing and usually test engineers
perform.
a. Presentation layer
b. Business layer
b. Business Logic: - The logic that is used for performing the operations on
the application is known as business logic.
c. Data Base Logic: - The logic that is used for sharing and retrieving the
data is known as database logic.
One-Tier Architecture
PL
crp.testing@gmail.com 9
b. Client –server environment:
In this type of environments there will be two tiers, one tier is for
clients and other tier is for database servers. The presentation layer
and the business layer will be present in each and every client . The
database layer will be present in the database server. This type of
environment is suitable for multi user application in a single or a
limited area.
PL+BL DBL
PL+BL
PL+BL
Clients Server
c. Web environment: - In his type of environment three tiers will be there. One is
for client’s the middle one is for application server and the other one is for
database servers. Presentation layer will be present at clients, Business layer
will be present in the application server, and database layer will be present at
the database servers. This type of environment is suitable for the applications
that are used all over the world by limited number users
Three-tier Architecture:
PL
DBL
BL
PL
DBL
PL
Clients
crp.testing@gmail.com Appl Server Database10server
Web server: -
It is software, which provides web services to the clients.
E.g.: - Internet Information service (IIS).
Example for Application servers: Tom pact, Web logic, web sphere etc..,
d. Distributed environment: -
It is similar to the web environment but the number of application
servers are increased and represented in individual tiers in order to
distribute the business logic so that the logic will be distributed.
N-tier Architecture:
W
PL DBL
BL BL BL
PL
PL
PL
******************^^^^^^^^^^^^^^^^^^^^^^^********************************
crp.testing@gmail.com 11
Software Development Models: -
ANALYSIS SRS
Sys.design
UTR
CODING
Implementation Unit test
Int. test UTR
DEL&MAINT UTR
Delivery to
client
Advantages:
It is a simple model
Project monitoring & maintenance is very easy
Drawbacks:
crp.testing@gmail.com 12
Con not accept the new requirements in the middle of the project
H/Wprototype H/Wprototype
Prototype
S/WPrototepe H/Wprototype
REQ.are
Advantages: - BRS DOC
Refined
Baseclear
Whenever the customer is not Lined
with the requirements this is the best
suitable model for gathering the clear requirements.
Drawbacks: -
It is not a complete model
Prototype has to be built on companies cost
User may limit his requirements by sticking to the prototype.
Initial Req
User
Application User
validation acce
pt
crp.testing@gmail.com 13
Spiral Model: -
Defining the objectives/WA/Constraints
Implementation
Advantages: -
This is the best suitable for developing the highly risk based project
(scientific projects)
Drawbacks: -
Risk analysis and estimation is not an easy task
It is a costly model
It is a time consuming model
Advantages: -
This is the best suitable for developing the highly risk based project(scientific projects)
Drawbacks: -
o Time consuming Model
o Costly model
crp.testing@gmail.com 14
Verification: -
It is a process of checking conducted on each and every role of the organization in order to
check whether they are working according to the guidelines or not right from the starting
of the process till the ending of the process
Validation: -
It is a process of checking conducted on the developed product in order to check whether it
is working according to the requirements or not.
(D) V-Model: -
Verification
Validation
BRS Preparing proj plan
Initial& design SRS Preparing Test plan
Phase Req.Phase testing
Port Testing
S/W efficiency
DRE=A/A+B
Delivery & Maintenance Test S/W changer
Advantages; -
AS verification and validation as well as test management process is done the out
come will be a quality product.
Drawbacks: -
o Time consuming mode
crp.testing@gmail.com 15
o Costly model
2. Regression Testing: -
It is a type of testing in which one will perform testing on the already tested
functionalities again and again.
It is usually done in two scenarios.
1. Whenever the testers has raised the defects, rectified by the developers and next
build is released to the testing department then the test engineer’s will test the
defect functionality as well as the related functionality once again.
2. When ever some new features are incorporated by the developers, next build is
released to the testing department then the test engineers will once again test the
related functionalities of the new features in order to confirm that they are
working same as previous.
Note: - Testing the new functionalities for the first time is known as new testing but not
Regression Testing.
crp.testing@gmail.com 16
3. Re-Testing: -
It is a type of testing in which one will test the same functionality again and again
with different sets of values in order to come to a conclusion whether it is working or not.
Advantage: - If at all any defects are found then there is a chance of rectifying them
immediately.
5. -Testing (Beta): -
It is a type of user acceptance testing done in the clients place either by the end-
users or by the third party testing experts before actual implementation.
Drawback: If at all any defects are found then there is no chance of rectifying them
immediately.
6. Static Testing: -
It is a type of testing in which one will perform testing on the application or
application related factors with out performing any action.
Eg:- Documentary testing, GUI testing, Code reviews and etc.,
7. Dynamic Testing: -
It is a type of testing in which one will perform in the application or its related
factors by doing some actions
Eg: - Functionality testing.
8. Installation Testing: -
It is a type of testing in which one will install the application in to the environment
by following the guide lines provided in the installation document and if the installation is
successful then he will come a conclusion that the given guide lines are correct other wise he
will come to a conclusion that the given guidelines are not correct.
9. Compatibility Testing: -
It is a type of testing in which one may have to deploy the application in to the
multiple number of environments prepared with different combinations of environmental
components in order to check whether the application is compatible with all that
environments. This type of testing is usually done to products.
crp.testing@gmail.com 17
10. Monkey Testing: -
It is a type of testing in which one will perform abnormal action on the application
intentionally in order to check the stability of the application.
a. Authentication Testing
b. Direct URL Testing (Uniform Resource Location)
c. Fire Wall Leakage Testing.
crp.testing@gmail.com 18
It is a type of testing in which one will enter the URL of an unauthorized page
directly in the browser and try to access that page in order to check whether it is been
accessed or not.
It is a type of testing in which one will enter as one level of user and try to access the
other level of unauthorized pages in order to check whether the firewalls are working
properly or not.
They are…
Test Planning
Test Development
Test Execution
Result Analysis
Bug Tracking
Reporting
crp.testing@gmail.com 19
Plan: -
It is a strategic document, which describes how to perform a task in an effective,
efficient and optimized way.
Test Plan: -
It is a strategic document, which describes how to perform testing on an application
in an effective, efficient and optimized way.
Optimization: -
Optimization is a process of utilizing the available input resources to their max and
getting maximum possible out put.
1.0 Introduction
1.1 Objective
1.2 Reference Document
crp.testing@gmail.com 20
4.0 Base criteria
4.1 Acceptance criteria
4.2 Suspension criteria
8.0 Scheduling
11.0 Assumptions
1.0 Introduction: -
1.1 Objective: -
The Purpose of the document is clearly described here in this section
crp.testing@gmail.com 21
c. The functionalities that are planned to be incorporated in future
d. The features that are to be skipped based on the time constraints.
Test Plan: -
It is defined as a project level term, which is used for testing a particular
project in the organization.
Note: - Test strategy is common for all the projects but the test plan is
specific for a particular project
3.6 Terminology: -
The list of all the terms and the meaning that are used in that company will
be listed out here in this section
crp.testing@gmail.com 22
3.8 List Of Automated Tools: -
The list of all the automated tools that are used in that company will be listed
out here in this section.
The list of all the documents that are to be prepared during the testing phase
will be listed out here in this section.
Eg: Test case, defects profile document.
8.0 Scheduling: -
The starting dates and the ending data of the each and every task is clearly
planned here in this section.
Example:
crp.testing@gmail.com 23
Risks:
i. Unable to deliver the soft ware with in dead lines.
ii. Employees may leave the organization in the middle of the
project
iii. Customer may impose the dead lines.
iv. Unable to test all the features with in the time.
v. Lack of expertisation
11.0 Assumptions: -
The list of all the assumptions that are to be assumed by the test engineer will
be listed out here in this section.
Screen Shots
Use Cases:
Use case is a description of functionality of certain features of an application
in terms of actors, actions& responses
crp.testing@gmail.com 24
Input information required for preparing the use case Document: -
i. Screen shot
ii. Functional requirements
iii. Special requirement/Business rules/Validation
iv. Template
i. Screen Shot: -
User name
Password
Connect to
a. Initially whenever the login screen is Invoked Login, clear buttons must
be disabled.
b. Cancels Button must be always enable.
c. Up on entering user name and password the login button must be
enabled.
d. Up on entering some information in to any of the fields the clear button
must be enabled
e. The Tabbing order must be user name, Password, Connect to, Login,
clear, cancel.
iv. Use Case Template:
Name Of The Use Case :
Brief Description of Use Case :
Actor’s Involved :
crp.testing@gmail.com 25
Special Requirements :
Pre Condition :
Post-Conditions :
Flow of Events :
Test Case: It is prepared by the Test Engineer based on the use cases from FRS to
check the functionality of an application thoroughly.
Test Plan: Team Lead prepares Test plan, in it he represents the Scope of the test,
What to test and What not to test, Scheduling, What to test using automation etc.
1. Explicit Requirements: -
The Requirements that are directly given by the customer are known
as explicit requirement.
2. Implicit Requirement: -
The requirements that are analyzed by the business analyst feeling
that they will add the value (user friendliness) to the application are known
as implicit requirements.
crp.testing@gmail.com 26
Up on entering user name and password the login button must be
enabled.
Up on entering some information in to any of the fields the clear
button must be enabled
The Tabbing order must be user name, Password, Connect to, Login,
clear, cancel.
Initially whenever the login screen is invoked the cursor must be available in
the user name field
Upon entering in valid username, valid password and clicking on log in
button an error message should be displayed “Invalid username Please try
again”
Upon entering valid username, In valid password and clicking on login
button an error message should be displayed “Invalid Password Please Try
again”
Upon entering Invalid username, Invalid password and clicking on login
button an error message should be displayed “Invalid user name and
password Please try again”
Post-Conditions: Either home page or admin page for the valid user and error
message for the invalid users
1. Main Flow
2. Alternative Flow
3. Exceptional Flow
1. Main Flow:
Action Response
crp.testing@gmail.com 27
1. Actor invokes the application. 1.Login Screen is displayed with the following fields
Username, Password, Connect to, Login, Clear&
cancel.
2. Actor enters valid user name, Valid 2. Either home page or admin page is displayed
password and clicks on login button. depending up on the actor entered by authenticating.
3. Actor enters valid user name, valid 3. Authenticates, Either home page or admin page is
password, selects a database option and displayed depending up on the action entered with
clicks on login button. mentioned data base connection.
4. Actor enters invalid user name Valid 4.Go to Alternative flow table 1
password and clicks on login button.
5. Actor enters valid user name, Invalid 5.Go to Alternative flow table 2
password and clicks on login button.
Identify the functionality of the use case with respect to the total
functionality
Authentication
Identify the functional points and prepare the functional point document.
Functional Point: -
The point where an user can perform some action is known as
functional point.
crp.testing@gmail.com 29
Testing Process: -
FRS FPD MTCD DTCD DPD
8 22 5 5
47
1 1
2 1
3 1
4 2
5 2
6 2
7 2
8 2
There are two types of test cases if we see broadly they are:
1. GUI Test Cases
2. Functional Test Cases
crp.testing@gmail.com 31
Test Case Template: -
Check for the availability All the objects must be All the objects
of all the objects as per available as per the are available as
the Login Obj Tab login obj tab per the login obj
1 GUI tab Pass
crp.testing@gmail.com 33
Login, clear,
Cancel
Corresponding Corresponding
Enter username, messages should be error messages
Password as per the IVIT displayed as per IVIT are not displayed
13 Negative and click on login button as per IVIT Fail
Enter some information
only in to the user name
Login button must be
field and check for the
disabled
enabled property of login Login button is
14 Negative button enabled Fail
Enter some information
only in to the password
Login button must be
field and check for the
disabled
enabled property of login Login button is
15 Negative button enabled Fail
4 Login Button
5 Clear Button
6 Cancel Button
crp.testing@gmail.com 34
Valid Inputs Table (IVIT)
Sno User Name Password Expected Page Actual value Result
1 Suresh1 qtp Invalid User name Plz try again Admin Fail
Invalid User name Plz try
2 Raja2 rani Invalid User name Plz try again again Pass
Invalid password Plz try Invalid password Plz
3 Chiru DADA again try again Pass
Invalid password Plz try Invalid password Plz
4 Praveen TOPI again try again Pass
Invalid user name & Invalid user name &
5 NTR1 illu4 password Plz try again password Plz try again Pass
Invalid user name & Invalid user name &
6 Admin5 Admin6 password Plz try again password Plz try again Pass
In this phase the test engineer will compare the expected values with the actual
values and if both are matched they will document the result as pass other wise they
will document the result as fail.
Bug Tracking is a process in which the defects are identified, Isolated and managed
Defect –ID: -
crp.testing@gmail.com 35
The lists of defect numbers are mentioned here in this section.
Defect Description: -
What exactly the defect is clearly described here in this section.
Submitter: -
The name of the test engineer who has submitted the defect will be mentioned here
in this section.
Date Submission: -
The date on which the defect is submitted is mentioned here in this section.
Version No: -
Corresponding Version number is mentioned here in this section.
Build No: -
Corresponding build number is mentioned here in this section.
Assigned To: -
The development lead will fill the developers name for whom the defect is assigned.
crp.testing@gmail.com 36
1.Enter some
information in to any
Upon Clicking on of the fields
clear button all the 2.Click on clear
fields are cleared button
but the cursor is not 3.Observe that the
placed in the user cursor is not placed
name field in the username
fields after clearing
all the fields
2 Sri Balaji 11-Feb-08 1.0.0 1
1.Enter Suresh1 in
to the user name
Upon entering
field 2.Enter
Suresh1 as
qtp in to the
username and qtp
password field
as password and
3.Click on login
clicking on login
button
button admin page
4.Observe admin
is displayed instead
page is displayed
of error message
instead of error
message.
3 Sri Balaji 11-Feb-08 1.0.0 1
1. Enter some
information in to
Up on entering the username field
information only in 2.Check for the
to the user name enabled property of
field login button is login button. 3.
enabled instead of Observe that login
being disabled button is enabled
instead of being
disabled.
4 Sri Balaji 14-Feb-08 1.0.0 1
1.Enter some
information in tho
Upon entering the password field
information only in 2.Check for the
to the password enabled property of
field login button is login button
enabled instead 3.Observe that login
being disabled button to enable
instead of being
disabled
5 Sri Balaji 11-Feb-08 1.0.0 1
Defect- Id: -
The list of defect numbers are mentioned here in this section
Defect Description: -
What exactly the defect is clearly described here in this section
crp.testing@gmail.com 37
Steps for reproducibility: -
The list of all the steps that are followed by the test engineer to identify
the defect will be listed out here in this section
Submitter: -
The name of the test engineer who has submitted the defect will be
mentioned here in this section.
Date Of Submission: -
The date on which the defect is submitted is mentioned here in this
section.
Version No: -
Corresponding Version number is mentioned here in this section.
Build No: -
Corresponding build number is mentioned here in this section.
Assigned To: -
The development lead will fill the developers name for whomthe defect
is assigned.
Severity: -
How serious the defect is defined in terms of severity, Severity is
classified in to four types:
1. Fatal (Sev1) or S1 or 1
2. Major (Sev2) or S2 or 2
3. Minor (Sev3) or S3 or 3
4. Suggestion (Sev4) or S4 or 4
1. Fatal:
If at all the problems are related to the navigational blocks or unavailability
of functionality then such type of defects are treated to be fatal defect.
Val1
Main Menu Val2
Result UN
ADD AVAILA
BLE
Next
Next Next
2. Major: -
crp.testing@gmail.com 38
If at all the problems are related to the working of major functionalities
then such types of defects are treated to be major defects.
Val1 10
Val2 20
Result -10
ADD
3. Minor: -
If at all the problems are related to the Look & Feel of the application
then such type of defects are treated to be minor defects
Val1
Val2
Result
BAD
4. Suggestions: -
If at all the problems are related to the value of the application then such
type defects are treated to be suggestions.
Some Invalid
+Ve integer Box alphabets Entry
Plz Try
again
Priority: -
Priority defines the sequence in which the sequence in which defects has to be
rectified. It is classified in to four types
crp.testing@gmail.com 39
1. Critical (Pri1) or P1 or 1
2. High (Pri2) or P2 or 2
3. Medium (Pri3) or P3 or 3
4. Low (Pri4) or P4 or 4
Usually the Fatal defects are given critical priority, Major defects are
given High priority, Minor defects are given Medium Priority and suggestions are
given Low Priority, But depending up on the situations the priority will be
changing.
I - Case:
Low severity-High Priority Case: -
Up on customer visit to the company all the look and feel defects are
given highest priority.
II - Case:
High severity –Low Priority Case: -
When ever 80% of the application is released to testing department as
20% is missing the test engineers will treat them as Fatal defect but the development
lead will give least priority for those defects as features are under development.
Testers
REQ error
As per
No design
Is it OP
DEV Rectific
Reall EN
ation
y
Defe
ct
M1
Build #1 Fixed for
verification
Build #2
TESTING
Yes
If STOP TESTING
Def
No ect
Ne
w Is
defect
is
RE really
ope verifie Clos
crp.testing@gmail.com ed 40
n d
Yes
No
Status: -
New: - When ever the defect is found for the first time the test engineer will set the
status as New.
Open: -When ever the developer accepts the raised defect then he will set the status
as open.
Fixed for verification Or Fixed for rectified: - When ever the developer rectifies the
raised defect then he will change the status to fixed.
Re open and Closed: -When ever the defects are rectified, next build is released to
the testing dept then the test engineers will check whether the defects are rectified
properly or not. If the defect is rectified properly then the test engineer will set the
status as “Closed”. If the defect is not rectified properly then the test engineer will
set the status as “Re open”.
Hold: - When ever the developer is confused to accept or reject the defect then he
will set the status of the defect as hold.
As Per Design: - When ever the test engineer is not aware of new requirements and
if he raises defects related to the new features then the developer will set the status
“ As Per Design”.
Note: This is a rare case not usually Occurs
crp.testing@gmail.com 41
Ways of Testing:
There are two ways of Testing
1. Manual Testing
2. Automation Testing
1. Manual Testing:
It is a way of testing in which one will perform all the phases of software
testing life cycle like Test planning, Test development, Test execution, Result analysis, Bug
tracking, and Reporting are accomplished manually, successfully with human efforts
Drawbacks of Manual Testing:
More number of people are required
Time consuming
Human mistakes (no accuracy)
Tiredness
Simultaneous action are not possible
Cannot repeat the same task again and again in a
perfect manner.
2. Automation Testing:
Automation testing is a process in which all the drawbacks of manual testing
are addressed properly and provides speed and accuracy to the existing testing process.
Drawbacks of Automation Testing:
Tools are expensive
Cannot automate all the area
Lack of experts
Automated Tool:
Automated tool is an assistant of a test engineer, which works based on the
instructions and information given by a test engineer.
crp.testing@gmail.com 42
2. Management Tools (Test Director/Quality
Center)
3. Performance tools (Load Runner)
E name
E age
E Sal
E Desig
Submit
VbWindow("VbWindow").VbEdit("VbEdit").Set "10"
VbWindow("VbWindow").VbEdit("VbEdit_2").Set "20"
VbWindow("VbWindow").VbButton("ADD").Click
VbWindow("VbWindow").VbButton("SUB").Click
crp.testing@gmail.com 43
VbWindow("VbWindow").VbButton("MUL").Click
VbWindow("VbWindow").VbButton("DIV").Click
VbWindow("VbWindow").VbButton("CLEAR").Click
Adding Manager:
Adding manager is a feature provided by QTP which is used for
showing all the list of adding’s while opening the QTP so that the user can select the
desired adding’s and then enter in to the QTP, Before the user access the QTP the
adding manager will make the QTP compatible with all the selected environments.
1.Test Pane:
Test pane is an area provided by QTP, which is used for developing,
viewing, and modifying the test screen. It represents the test scripts in two views
(a). Expert view
(b). Key word view
(a). Expert view: It represents the script in VB script format
(b). Keyword view: Keyword view represents the script using a graphical user
interface (GUI) which is further divided in to four parts.
Item
Operation Value
Documentation
2.Active Screen:
Active screen is an area provided by QTP, which holds the snapshots of each
and every script statements and used for the following.
Easily understanding the script
Easily enhancing the script.
3.Data-Table:
The date table is originally called as formula1 sheet developed by third party
and integrated with QTP.
Features:
It is used for holding the test data
crp.testing@gmail.com 44
It isolates the test script from the data source.
It provides the facility to import the test data from
different data sources like excel files, data base and flat
files (a file with out having format)
It allows the user to interact with the data directly
5.Tool- Options:
All the options available in the menu bar, file tool bar and testing tool bar
are known as tool-options.
Navigation:
Activate the menu item test
Select the option record and run settings
Select one of the following options
Record and run test on any opened windows based application
Record and run on these application (opened on session start)
If at all second option is selected then click on add button
Browse the desired application part
Click on OK
Click on apply & OK.
crp.testing@gmail.com 45
1. It will read the script statement and understands what
action to be performed on which object.
2. Then it realizes it need to identify the object first to
perform the action
3. To identify the object it requires some information for that
information it will go the object repository and search.
4. Once the information is found using this information it will
try to identify the original object.
5. Once the object is identified it will perform the action on it.
Recording Modes:
There are there types of recording mode
(a). Context sensitive recording mode or Normal recording
mode
(b). Analog Recording Mode
(c). Low-level Recording mode.
Navigation:
Keep the tool under normal recording mode
Activate the menu item test
Select the option analog recording
Select one of the following option
o Record relative to the screen
o Record relative to the following window
If at all second option is selected specify the window
title with the help of the Hand Icon
Click on start analog record
OBJECT REPOSITORY
Object Repository:
Object repository is a storage place where one can store the objects
information and it also acts as interface between
n the test script and the AUT(application under test) in order to identify the original
objects during execution
crp.testing@gmail.com 46
Types of Object Repository:
There are two types of object repository they are
1. local Repository
2. Shared Repository
(1). Local Repository:
If at all this type is selected as an object repository then the QTP will
be automatically creating and managing an individual repository for every action.
(2). Shared Repository:
Shared repository has to be created and managed manually once a
shared repository to created it can be shared among number of tests
Advantages:
Easy to maintain
Re-usability
crp.testing@gmail.com 47
Navigation for deleting the objects form the object repository:
Select the desired object to be deleted in the object
hierarchy
Right click on it
Select the option delete
Confirm the deleting by clicking on YES
Highlight:
Highlight button is used for highlighting the corresponding object in
the AUT so that a test engineer can clearly understand which objects information is
that.
OBJECT IDENTIFICATION
Object identification:
Object identification is based on four types of properties and an ordinal
identifier
Types of properties:
1. Mandatory Properties
2. Assistive properties
3. Base-Filter Properties
4. Optional Filter properties
A test engineer can specify the list of mandatory properties, List of assistive properties,
List of base filter properties, list of optiopnal filter properties and an ordinal identifier.
QTP learns the information in the following in case only normal brain:
crp.testing@gmail.com 48
First of all the QTP will learn all the mandatory properties at a time and then think
weather these properties are sufficient to identify the object uniquely. If it feels
sufficient then it will stop learning otherwise it will learn the first assistive property and
once again stops and thinks weather these properties are sufficient to identify the object
uniquely. If it feels sufficient then it stops learning otherwise learns the second assistive
property and checks weather these properties are sufficient or not. This process
continuous till the QTP satisfies or up to the end of the assistive properties list. At the
end of the assistive properties list also if it feels not satisfied then it will finally learn the
ordinal identifier and stops learning.
QTP learns the information in the following way in case of smart brain also:
While learning the mandatory properties along with them it will learn
the base filter properties, optional filter properties and stores them in the secret
place.
It considers the mandatory properties only and check weather these
properties are sufficient to identify the object uniquely. and repeats the above
process.
Note: In the above learning process except base filter properties and optional filter
properties all the remaining information learnt will be stored in the object repository.
QTP will use the information in the following way to identify the object during
execution:
First of all QTP will use all the properties present in the object repository
except ordinal identifier and try to identify the object. If at all the object is not identified
then it will forget about all these properties and freshly enters in to the secret place.
QTP will consider all the base filter properties and try to identify the
object and forms a list of all the objects that are matched with the base filter properties.
If the list contains only one object then that is the object otherwise it will take the
support of first optional filter property and try to match with all the object present in the
list and forms a new list of all the objects that are matched with that property and then
check weather the list is containing one object or more that one object. If the list is
containing more than one object then it will consider the second optional filter property
and repeats the whole procedure till the list contains on object or up to the end of the
optional properties list.
At the end of the optional filter properties list also if the list is containing more than one
object then it will finally go to the object repository and check weather the ordinal
identifier is available or not. If at all the ordinal identifier is available it will identify the
object roughly using that otherwise HANDSUP.
Ordinal Identifiers:
There are three types of ordinal identifiers
1.Location
2.Index
3.Creation time
crp.testing@gmail.com 49
1.Location:
If at all the location is selected, as an ordinal identifier then the QTP will
generate a sequence of numbers from 0,1,2,3 based on the sequence of the objects
located in AUT.
2.Index:
If at all the index is selected as an ordinal identifier than the QTP will
generate the numbers from 0,1,2,3…. Based ob the sequence of the programs of the
objects.
Smart Identification:
When ever the QTP is unable to identify the objects with the help of the
properties present in the object repository then the special mechanism provided by QTP
to identify the object smartly with some other properties is known as smart
identification.
Object Spy:
Object spy is a handy feature provided by QTP which is used for
showing the complete objects information like list of properties and their values, list
of methodology, syntax for methodology and description of methods then and there
on the spot immediately of both test objects as well as runtime objects.
Navigation for Object SPY:
crp.testing@gmail.com 50
Select the option object spy
Click on the hand icon
Click on the desired object
Types Of Objects:
There are two types of objects 1.Run time objects
2.Test objects
2.Test Objects:
Test objects are the reference objects created by the QTP for run time
objects, stored in object repository and used by the QTP for the original objects
I. Test Planning:
In this phase the automation test lead will do the following
1. Under standing the requirements
2. Identifying all the areas to be automated
crp.testing@gmail.com 51
3. Analyzing both the negative and positive flow of the
application
4. Preparing the automation test plan document based on the
analysis
5. Preparing the tool ready with all the pre configurational
settings for the further operations
II. Generating the basic test:
In this phase the automation test engineer will generate the basic test
engineer will generate the basic test for both the +ve and –ve flow of the application
IIII. Enhancing the Test:
One can enhance the script in the following ways
1. Inserting the check points
2. Synchronizing the test
3. Parameterising the test (Data Driven Testing)
4. Inserting the out put value statements
5. Inserting the transactional points for measuring
transactions
6. Inserting the programmatic statements
7. Adding comments
8. Inserting the script statement manually
1.Check Point:
Checkpoint is defined as validation pointer test point which checks the
objects state or bitmap state or data state during execution at any point of time
i. Pre-execution Phase:
It captures the expected value
Generates the corresponding test script statement
ii. While-execution phase:
It captures the actual value
Compared the actual value with the expected value
Displays the result
Types Of Checkpoints:
a. Standard checkpoints
b. Bitmap checkpoint
c. Text checkpoint
d. Text area checkpoint
e. Data base checkpoint
For Web
Checkpoints f. XML checkpoint
g. Page checkpoint
Hidden Checkpoints
crp.testing@gmail.com 52
h. Table checkpoint
i. Image checkpoint
j. Accessibility checkpoint
a. Standard Checkpoints:
Standard
checkpoint is used for checking the standard GUI objects properties
value, it can be inserted in two ways
i. Through application
ii. Through Active Screen
p checkpoints:
Bitmap
checkpoint is used for checking the complete bitmap or apart of a bitmap.
It can be inserted in two ways
i. Through application
crp.testing@gmail.com 53
ii. Through Active Screen
Checkpoint:
Text
checkpoint is used for checking the text present on a specified object. It
can be inserted in two ways
i. Through application
ii. Through Active
crp.testing@gmail.com 54
o Text not displayed
Click on OK
a Check Point:
Test
area checkpoint is used for checking the test presenting a specified area.
It can be inserted only through the application but not through the active
screen
e Checkpoint:
Data base check
point is used for checking the contents of the data base
Navigation:
Activate menu item insert
Go to check point
Select the option data base checkpoint
Select the option specify AQL statement manually
Click on meet
Click on create
Click on new
crp.testing@gmail.com 55
Select the desired driver
Slick on next
Click on finish
Click on select
Select the desired database
Click on ok
Click on ok
Click on ok
Specify the designed query statement
Click on finish
Select the desired contents to be checked
Select one of the following option
o Before current step
o After current step
Click on ok
Check Point:
XML
is an universally understandable language which is mainly used for data
information
Note: XML check point is used fro checking the contents of an XML file
Navigation:
Activate the menu item insert go to check point
Select the option XML check point
Browse the desired XML file
Click on OK
Select the desired contents to de checked
Select one of the following option
o Before current step
o After current step
Click on OK
ble Check Point:
This is
used for checking the contents of a table
Navigation:
Keep the cursor on the desired statements, so that the
corresponding page will be displayed in the active
screen
Go to active screen
Right click on the page
Select the option, Insert standard check point
Select the desired table in the object hierarchy
Click on ok
Select the desired properties to be checked
Select one of the following option
o Before currant step
crp.testing@gmail.com 56
o After currant step
Click on ok
Navigation:
Keep the cursor on the desired statement sot heat the corresponding page is
displayed in the active screen
Go to the active screen
Right click on the page
Select one of the following options
o Before currant step
o After currant step
Click on ok
2. Synchroniztion:
Synchronization is a process of matching the speeds of both the tool and the application
in order to keep them in sync with each other to obtain proper testing results
Here the main concept is making the tool to wait till the application finishes its work it can
be done in three ways
1. Inserting the synchronization point
2. Increasing the default time
3. Inserting the wait statement
crp.testing@gmail.com 57
Navigation for inserting the synchronization point:
To avoid the above navigation one can directly type manually as follows:
A= datatable(“v1”,1)
Vbwindow(“form1”).vbedit(“val1”).set A
B= datatable(“v2”,1)
Vbwindow (“form1”).vbedit(“val2”).set datatable(“v2,1)
Vbwindow(“form1”).vbbutton(“Add”).Click
Vbwindow(“form1”).vbedit(“res”).check checkpoint(“RES”)
crp.testing@gmail.com 59
It will generate the corresponding script
2.While-Execution phase:
Captures the actual value from the field
Stores it under a specified column in the run time data table
1.Standard Out Put Value: - It is used for capturing property value of a standard GUI
object
2.Text Out Put Value: - It is used for capturing the text present on a specified object
3.Text-Area Out Put Value: - It is used for capturing the Text present in a specified area
4.Data Base Out Put Value: - It is used for capturing a value from the database
5.XML Out put Value: - It is used for capturing a value from the XML file
It is a concept introduced in QTP which is used for calculating the time taken by an
application to perform a specific task or the execution time of a block of statement
To do the same QTP has provided two options
crp.testing@gmail.com 60
1.Start transaction
2.End transaction
Navigation for inserting transaction points:
Keep the cursor in the desired location
Activate the menu item insert
Select the option start transaction
Specify the transaction name
Select one of the following option
o Before currant step
o After currant step
Click on ok
To avoid the above navigation one can directly type the following statements
manually in the desired location
Services.start transaction ”transaction name”
-----------------------------------
-----------------------------------
------------------------------------
Services.end transaction ”transaction name”
Status:
Pass 0
Fail 1
Done 2
Warning 3
Debugging:
Debugging is a process of executing the script or aprogram in a user desired passion
with some temporary breaks in order to identify the errors
To do the same QTP has provided step commands and break point feature.
crp.testing@gmail.com 61
Step commands: -
There are three step commands
1.Step into
2.Step Out
3.Step over
1.Step into:
Step into is used for executing a single statement then it will step in to the function
or action and stops the execution.
2.Step Out:
Step out is used for executing all the remaining statements from the position of
pointer in the function of the action and comes out of the function or action and stops execution
3.Step Over:
Step over is used for executing the single statement if that statement is a function
call or action call then it will execute all the statements in side the function or action once and
stops the execution
Break Point:
Break point is the feature provided by QTP, which is used for breaking the
execution temporarily
Navigation:
Activate the menu item debug
Select the desired option
Example
Function my func( )
Msg box “Hai”
Msg box “hellow”
Msg box “How r u”
End function
My func
Msg box “bye”
My func
Msg box”see u”
My func
Msg “welcome”
ADVANCED CONCEPTS
Regular Expressions: -
crp.testing@gmail.com 63
When ever the QTP is unable to identify the objects due to the regular changes in
the objects properties values dynamically during the execution then to overcome this problem one
need to replace the corresponding property value in the object repository with a suitable regular
expression
Navigation:
Open the object repository
Select the desired object in the object hierarchy
Select the desired property in the properties list
Click on the constant value options button
Replace the constant value with suitable regular expression
Select the check box regular expression
Click on ok
Click on ok
Recovery Scenarios:
During the execution QTP may face some problematic situation where in it needs to
recover by itself and continue the execution. To do the same a test engineer would have defined a
solution well in advance and made it available to the currant test before starting the execution.
QTP may face four types of problematic situations
1.Problems related to pop-up window
2.Problems related to object state
3.Problems related to test execution
4.Problems related to application crash
To define the solution for the above problems QTP has provided four trigger events
1.Pop up window
2.Object state
crp.testing@gmail.com 64
3.Test run error
4.Application crash
So all the tests using those variables will be automatically updated such kind
of variables separately declared in the environment file are known as environment variables
There are two types of environment variables
1.Built in variables
2.User defined variables
crp.testing@gmail.com 65
1.Built in variables:
These variables will be by default available with all the tests so that on can
directly use them in any test with the following syntax
To avoid the above navigation one can directly develop the XML file as follows
<environment>
<variable>
<name> flight path </name>
<value>”d:\program files\mercury” </value>
</variable>
<variable>
<name> b </name>
<value>203</value>
</variable>
</environment>
crp.testing@gmail.com 66
Select the check box load variables and value from ecternal
files
Browse the path of the environment file
Click on apply and ok
In order to avoid the above navigation one can directly type the following script
statement in the starting of the script
Virtual object configuration is a process of making the QTP t treat a specified area
or an user defined object as a specific object
Navigation:
Activate the menu item tools
Go to virtual objects
Select the option new virtual object
Click on next
Specify the desired class(type) of the object
Click on next
Mark the area in the application with the help of mark object button
Click on next
Select one of the following options
o Entire parent hierarchy
o Parent only
Click on next
Specify the desired object name
Specify the desired collection name
Click on finish
Once a virtual object is created it will be available to all the tests unless until we delete
it.
Framework:
Framework is a generic work (outline work) or a set of guidelines designed by an
expert to perform a task in an effective, efficient and optimized way
1.Linear Framework
Generate the basic test
Enhance the test
Debug the test
Execute the test
Analyze the test
2.Modular Framework:
Develop the individual components for each and every task
Make them as reusable components
Prepare the required drivers based on the end to end scenarios
Execute the drivers
Analyze the result
Actions
ACTIONS: Action is a set of script statements used for performing a specific task
Types of Actions:
There are three types of actions
1.Normal actions
2.Re-usable actions
3.External actions
Note: External actions are not editable .The re-usable actions called in another test are known as
external actions
Operations On Actions:
Crate the required test data file and save them in the
corresponding folders
Create the required shared repository files and save them in
the corresponding folder
Create the required library files and save them in the
corresponding folder
Create the required environment files and save them in the
corresponding folder
Create the required recovery files and save them in the
corresponding folder
Open the main test and associate all the required files to each
Develop the script in such a weather it executes based on the
key words specified in the data table
Example:
crp.testing@gmail.com 69
Case”L2”
Openord( )
Logout( )
Case “L3”
Login( )
Logout( )
End select
Specify the desired key words under the corresponding column in the data
table and save the test in the corresponding folder
When ever required open the test and execute it and analyze the result
Methods
First method – Capture bitmap:
It is used for capturing a snap shot of an object or an window during
executin and stores it in the desired location
Wait property:
Wait property is used for making the tool to wait based on the object properties
value
Syntax: object hierarchy.wait property “property name”, property value, extra time in mille
seconds
Wait: it is used for making the tool to wait till the specified time is elapsed.
Syntax: Wait” Time in seconds”
crp.testing@gmail.com 70
The first method among those is click method.
1. Click method: -
Click method is used for clicking on specified object
Syntax: Object hierarchy.click(x,y,[button] )
2. Double click: -
It is used for double clicking on a specified object
Syntax: Object hirerarchy.dblclick(x,y, [button])
3.Set Method: - Set method is used for setting a value in to an edit box or selecting or deselecting
acheck box or selecting a radio button
Syntax: Object hirerearchy.set”value”
Object hierarchy of check box.set “on/off”
Object hierarchy of radiobutton.set
Case study-1:
Develop the script customer id, custname, currant age, cust phone number and clicking
on submit button
Cust
Cust Id:
Cust Name:
Cust Age:
Cust Ph no:
Submit
Vbwindow(“cust”).vbedit(“cust”).set.”Custid”
Vbwindow(“cust”).vbedit(“custname”).set”name”
Vbwindow(“cust”).vbedit(“custage”).set”age”
Vbwindow(“cust”).vbedit(“custphno”).set”phoneno”
Vbwindow(“cust”).vbutton(“submit”.click
crp.testing@gmail.com
NEXT 71
Vbwindow(“mindq”).vbcheckbox(‘testingtools”).set”on”
Vbwindow(“mindq”).vbcheckbox(“sqlserver”).set”on”
Vbwindow(“mindq’).vbcheckbox(“liveproject”).set “on”
Vbwindow(“mindq”).vbbutton(“next”)click
Develop the script for deselecting the testing tools check box,selecting the QTP and live
project check boxes and clicking on next button
Testing Tools
SQL Server
QTP
Live Project
Name
Fourth Case Study:
Age
Develop the script for entering the name, age, country, and selecting the gender, selecting the check
box photo profiles only and clicking on search button
Country
Matrimony
o Male
o Female
Photo profiles
only
crp.testing@gmail.com
SEARCH 72
Vbwindow(“matrimony”).vbedit(“name”).set”sri balaji”
Vbwindow(“matrimony”).vbedit(“age”).set”25”
Vbwindow(“matrimony”).vbedit(“country”.set “India”
Vbwindow(“matrimony”).vbradiobutton(“female”).set
Vbwindow(“matrimony”).vbcheckbox(“photo profile only”).set “on”
Vbwindow(“matrimony”).vbbutton(“search”).click
Select Method:
Select method is used for selecting an item in a combo box or a list box
Traintrain
Develop the script for entering No:number, train name, date of journey, selecting starting point,
selecting destination point, selecting berth, selecting class
Train Name:
RES Date of Journey:
From
To
UB First A/c
LB Second A/C
MB Third A/C
Sleeper
Break Fast
Lunch
Dinner
crp.testing@gmail.com NEXT 73
Vbwindow(“res”).vbedit(”trainno”).set”2085”
Vbwindow(“res”).vbedit(”Trainname”).set”Godavari”
Vbwindow(“res”).vbedit(”Date of journey”).set”15-aug-08”
Vbwindow(“res”).vbcombobox(“from”).select “Sec”
Vbwindow(“res”).vbcombobox(“To”).select”Tpg”
Vbwindow(“res”).vbradiobutton(“LB”).set
Vbwindow(“res”).vbradiobutton(“sleeper”).set
Vbwindow(“res”).vbcheckbox(“breakfast”).set on
Vbwindow(“res”).vbcheckbox(“dinner”).set on
Vbwindow(“res”).vbbutton(“next”).click
Activate Method:
It is used for activating a window or a dialog.
Syntax: Object hierarchy. Activate
Close Method:
It is used for closing the window or a browser
Syntax: Object hierarchy. Close
Set Secure:
Set secure method is used for setting an encrypted data in to an edit box
Type Method:
Type method is used for performing any kind of key board related operation
Syntax: Object hierarchy. Type key value
Example:
Dialog (“login”). Winedit(“agent name”).type mic tab
Descriptive Programming: -
If at all the objects description is specified in the program itself then that type of programming is
known as descriptive programming
crp.testing@gmail.com 74
Window(“text:=flight reservation’).close
GetRoProperty:
It is used for getting the currant value of the runtime objects property
Syntax: Variable=Object hierarchy.getroproperty(“property name”)
Sixth Case Study:
Develop the script for clicking on a ok button if it is existing and enabled otherwise the corresponding
message should be reported to the result window
Form 1
OK
PRODUCT
PID
PNAME
PRATE
QUANTITY
AMOUNT
CAL
crp.testing@gmail.com 75
Vbwindow(“product”).vbcombobox(“pid”).select “007”
Q=5
R=vbwindow(“product”).vbedit(“prate”).getroproperty “Text”
EV=r*q
Vbwindow(“product”).vbedit(“quantity”.set q
Vbwindow(“product”).vb button(“cal”).click
AV=vbwindow(“product”).vbedit(“amount”).getroproperty “text”
If (EV=AV) then
Reporter.reportevent, 0,”my report”,”cal button is working”
Else
Reporter.report event,3,”my report”,”cal button is not working”
End if
13.Round: It is used for rounding any decimal value to nearest highest integer
crp.testing@gmail.com 76
Eight-case study:
Develop the script for selecting product id, quantity, clicking on cal button, If it is existing and enabled
and checking weather it is working fine or not
Product
PID
PNAME
PRATE
QUANTITY
AMOUNT
CAL
Vbwindow(“procuct”).vbcombobox(“productid”).select “007”
Q=10
Vbwindwo(“product”).vbedit9”prate”).getroproperty(Text”)
R= vbwindwo(“product”.vbedit(“prate”.getroproperty(“text”)
Ev=R*Q
Var1= vbwindow(“product”).vbbutton(“cal”).exists
If cstr(var1)=cstr(true) then
Var2=vbwindow(“product”).vbbutton(“cal”).getroproperty”exists”
If cstr(var2)=cstr(true) then
Vbwindow(“product”).vbbutton(“cal”).click
Av=vbwindow(“product”).vbedit(“amount”).getroproperty(“text”)
If cint(Av)=cint(Ev) then
Reporter.report event micpass,”myreport”,”result is pass”
Else
Reporter.reportevent mic fail,”my report”,”result is fail”
End if
Else
Reporter.reportevent mic warning,”my report”,”cal button does not exists”
End if
Else
Reporter.reportevent mic warning,”my report”,”cal button is disabled”
End if
Get to property:
crp.testing@gmail.com 77
Gettoproperty is used for getting the text objects properties value
Note: Text objects property means the properties present in the object repository+properties present
in the secret place
Set to property:
Settoproperty Is used for setting the text objects properties value temporarily during the execution
SYNTAX: Object hierarchy.settoproperty “property name”,”property value”
Form 1 SPB
NC:Button
START Text:start
Vbwindow(‘form1”).vbbutton(“spb”).click
Vbwindow(“form1”).vbbutton(“spb”).settoproperty “text”,”stop”
Vbwindow(“form1”).vbbutton(“spb”).click
Vbwindow(“form1”).vbbutton(“spb”).settoproperty “text”,”start”
Vbwindow(“form1”).vbbutton(“spb”).click
1. Add- sheet: It is used for adding the new sheet for the runtime data table
SYNTAX: Data table.add sheet”sheet name”
2.Delete- sheet: It is used for deleting a specified sheet from the run time data table
SYNTAX: Data table.delete sheet”sheet name”
crp.testing@gmail.com 78
3.Import: It is used for importing the data present in all the sheets in an excel file to the runtime data
table
SYNTAX: Data table.import ”path of the excel file”
4. Import Sheet: It is used for importing specified sheet of data from the excel file to the specified
sheet in the runtime data table
SYNTAX: Data table. Import sheet “path of the excel file, source sheet id, destination sheet id”
5.Export: It is used for exporting the complete data present in the run time data table to a specified
location
SYNTAX: Data table. export “Path of the location with a file name.xls extension
6.Export Sheet: It is used for exporting the data present in a specified sheet in the run time data table
to a specified location
SYNTAX: Data table .export sheet “path of the location with a file name.xls extension”, sheet id to be
exported.
7.Set currant row: It is used for making the QTP focus on a specified row
SYNTAX: Data table. Set currant row (row number)
8.Set next row: It is used for making the QTP focused on the next of the currently focused row
SYNTAX: Data table. Set next row
9.Set Prev Row: It is used for making the QTP focus on the previous row of the currently focused tow
SYNTAX: Data table. Set prev row
10. Value Method: It is used for getting a value from a specified sheet, specified column and currently
focused row.
SYNTAX: Variable= Data Table. Value ( “column name”, sheet id)
11. Get Sheet: It is used for making the QTP to focus on a specified sheet
SYNTAX: Data table. Get sheet (sheet id)
12Get Row Count: It is used for getting the row count of a global sheet
If at all one wants to get the row count of a specified sheet first of all they need to make the QTP to
focus on a specified sheet and then get the row count
Example:
Data table. Addsheet “ Sri”
Data table.import sheet “e:\Sri\td122.xls,1,3
N=Data table.get sheet( 3).getrowcount
For i= 1 to n
Data table. Set currant row( i )
crp.testing@gmail.com 79
Vbwindow(“form1”).vbedit(“val1”).set data table(“v1”,3)
Vbwindow(“form1).vbedit(‘val2’).set data table(“v2”,3)
Vbwindow(”form1”).vbbutton(“add”).click
Exp val= data table.value(“ev”,3)
Act val= vbwindow(“form1”).vbedit(“res”).getroproperty(“text”)
If (exp val= act val) then
Data table (“res”,3)= “pass”
Else
Data table (“res”,3)= “fail”
End if
Next
Data table.export sheet “D;\fl_automation\log\file2.xls”,3
Data table.delete ‘Sri”
One ca pass number of values in to the function while calling and a function can
return only one value.
Example:
Input/Out put parameters concept is used for passing some values in to the action to return some
values once the execution is finish
To do the same one has to declare the desired number of input parameters and out put parameters at
the action, which is about to be called
Navigation:
Activate the menu item test
Select the option action properties
Select the parameters tab
Declare the desired number of input/output parameters
Using the corresponding add buttons
Click on OK
crp.testing@gmail.com 80
Exmaple
vbwindow("Form1").VbEdit ("val1").set parameter ("a")
vbwindow("Form1").VbEdit("val2").Set parameter ("b")
vbwindow("Form1").VbButton("ADD").Click
var= vbwindow("Form1").VbEdit("res").GetROProperty "text"
parameter ("c")= var
vbwindow("Form1").Vbbutton("SUB").Click
var1=vbwindow("Form1").VbEdit("res").GetROProperty "textA"
parameter ("d")=var1
vbwindow("Form1").VbButton("CLEAR").Click
At the calling point one need to specify the input values in a sequence separated by
commas and the variable names in a sequence in order to catch the return value
Dim qtapp
Dim qttest
Set qtapp= createobject (“quicktest.application”)
Qtapp.launch
Qtapp.visible= true
Qtapp.open”d:\aom1”, true
Set qttest=qtapp.test
Qttest.run
Qttest.close
Qttest.run
Attest.close
Qtapp.quit
crp.testing@gmail.com 81
Data Base Connection
Oracle connection:
Con .open “provider =oraoledb.1;server=local
host;uid=scott;pwd=tiger;database=testdata;”
SQLServer connection:
Con.open provider= sqloledb.1; server=local host; uid=sa; pwd=; database= test data;”
QTP 9.0,9.1,9.2
crp.testing@gmail.com 82
QTP 9.0:
Test menu item is renamed as Automation
Settings option is moved from test menu item to file menu item
Quality center connection option is moved from tools menu item to file menu
item
Step menu item is removed and all the options present under it are kept in the
edit menu item
A new menu item window is introduced used for managing the window
A new option by name function definition generator is introduced which is used
for creating the functions easily
New options are provided for commenting and un commenting the block of
statements
A new option by name check syntax is introduced under tools menu item used
for checking the syntax of script
Some of the options related to the resources like object repository, recovery
scenario manager are moved from tools menu item to a new menu item
resources
A new menu item resourced is introduced with some new options like object
repository manager and associate repositories
Object repository manager is used for creating and managing the shared
repositories with out having any connection to the test
6.Information screen:
Information pane is used for viewing the syntax related information during the syntax
Check
Main change: One can associate one or more shared repositories to an action a part from its local
repository
7.Missing resources:
crp.testing@gmail.com 83
When the test is being open if at all any associate resources like repositories, library files, recovery files
are missing then the complete information related to that will be shown in the missing resource pane
QTP 9.1:
A new feature by name navigate and learn is introduced present in multiple
pages or windows continuously by navigating
A new feature by name object repository comparison tool is introduced which is
used for comparing two shared repositories
QTP 9.1 is compatible with windows vista operating system and .net frame 2.0
environment
The script editor is made user friendly
The company has announced that they will provide license for all the add ins also
QTP 9.2:
A new feature by name screen recorder is provided which is used for recording
the movie of the execution and that can be played back during the result analysis
for better understanding
One can handle the object repositories dynamically through scripting with the
help of an utility object repositories collection
Example:
Repath= “d:\r1.tsr
Repositories collection.remove all( )
Repositories collection.add(repath)
vbwindow("Form1").VbEdit ("val1").set “10”
vbwindow("Form1").VbEdit("val2").Set “20”
vbwindow("Form1").VbButton("ADD").Click
Object spy functionality is enhanced in such a weather one can view multiple
objects information continuously by keeping the mouse pointer over the object
QTP 9.2 is compatible with the following browser
Internet explorer 7.0
Mozilla fire fox2.0
Net space navigation 8.1.0
Repositories
collectionRemoveAll
crp.testing@gmail.com 84
repositoriescollection.add"C:\Documents and Settings\srss\Desktop\asa.tsr"
VbWindow("CALCULATOR").VbEdit("VALUE1").Set "10"
VbWindow("CALCULATOR").VbEdit("VALUE2").Set "20"
VbWindow("CALCULATOR").VbButton("ADD").Click
database connections
Dim con, rs
Set con = createobject("adodb.connection")
Set rs= createobject("adodb.recordset")
con.provider= ("microsoft.jet.oledb.4.0")
con.open "d:\dbc.mdb"
rs.open "select * from dbc1", con
Do while not rs.eof
VbWindow("Form1").VbEdit("VALUE1").Set rs.fields("v1")
VbWindow("Form1").VbEdit("VALUE2").Set rs.fields("v2")
VbWindow("Form1").VbButton("ADD").Click
rs.movenext
loop
var = vbwindow("Form1").VbEdit("res").GetROProperty("text")
parameter ("c")= var
vbwindow("Form1").Vbbutton("SUB").Click
var1=vbwindow("Form1").VbEdit("res").GetROProperty("text")
parameter ("d")=var1
vbwindow("Form1").VbButton("CLEAR").Click
crp.testing@gmail.com 85
descriptive
Dialog("Login").Activate
Dialog("text:=login","width:=320").winedit("attached text:= Agent Name:").set"akhil"
Dialog("text:=login").winedit("attachedtext:=password:").setsecure"mercury"
Dialog ("text:=login").winbutton("text:=ok").click
QUALITY CENTER
Introduction:
Type of the tool: Management tool
Company: Introduced by mercury & taken over by HP
Scripting language: there is no script language
Version: 9.0
Definition: Quality center is a management tool which is used for managing the
whole testing process &also provide the following facilities.
Common repository facility
Automation tractability facility
Bug tracking tool facility
Automatic reports & graphs generation facilities
The defects, if at all any defects are found then one will use the
next module.
5. Defect Module: this module is very much similar to a bug tracking tool
which provides all the facilities for bug tracking & reporting.
Navigation:
Open Quality center
Site administrator
Add-ins page
crp.testing@gmail.com 87
User name
Password
login
crp.testing@gmail.com 88
Navigation for test plan:
New folder
New text
Login
invoke
TERMINOLOGY
1. Defect products: if at all the product is not justifying some of the
requirements but it is still usable, Then such type of product known as
defect products.
2. Defective products: if at all the product is not justifying some of the
requirements as well as it is not usable then such type of product known
as defective products.
3. Quality Assurance: QA is a department which checks each & every role in the
organization in order to conform whether they are doing their work
according to company process guide lines or not.
4. Quality Control: QC is a department which checks the developed products or
its related parts in order to conform whether they are working according
to the expectations or not.
5. NCR(Non Conformance Rate): Non conformance raised is a whenever the
role is not following the process then the penalty given for him is known
as NCR.
6. Inspection: It is a process of sudden checking conducted on the roles or
departments without any prior intimation.
7. Audit: it is a process of checking conducted on the roles and department
with prior intimation well in advance.
i. Internal audit: if at all audit is conducted by the internal
resource of the organization then it is known as internal audit.
ii. External audit: if at all audit is conducted by the external
people then it is known as external audit.
crp.testing@gmail.com 89
9. SCM (S/w Configuration Management): Configuration management is a
process
in which one will mainly prefer two tasks
i. Change Control: it is a process of updating all the related documents
whenever some changes are made to the application in order to keep
the documents and the application in sink with each other.
ii. Version Control: it is a process of maintaining the naming
conventions & version numbers.
Ex: HMS - Adml _ TC 001 1.0
10. Common Repository:CR is a basically a server which can access by only
authorized
People where in they can store the information & require the information.
Check in is a process of uploading in the information into common
repository.
Check out is a process of downloading the information from the
common
repository.
Ex: VSS(Visual Source Safe)
CVS(Concurrent version system)
11. Baseline: it is a process of finalizing the document.
12. Publishing: It is a process of making the finalized documents available to the
relevant resource by uploading them into CR with special icon representation.
13. Release: It is a process of sending the application from the development
department to the testing department or from the company to the market.
14. Delivery: it is a process of handover the application from the company to the
client or from the market to the client.
15. SRN (S/w Released Note): it is not prepared by the technical department &
sent to the testing department contains of the following information
1. Build path information
2. Test Date PI
3. Deployment document PI
4. Known issues PI
5. Released manager name
6. Released date
7. Build Number
8. Vesrion number
9. Project name
10. Module name etc..,
16. SDN(S/w delivery Note): it is a document which contains the following
information
i. user manual
ii. Known issues
crp.testing@gmail.com 90
it is a prepared by the team of members under the project
manager guidance & will given to the customer during the delivery.
17. Review: it is defined as in the process of studying or process of cheating
depending upon the role involved in it.
18. Review report: it is an outcome document of review which may contain
either list of doubles or list of comments depending upon the involved in it.
19. Peer – review: it is a process of checking conducted by the colleagues at the
same level.
20. Peer- review report: it an outcome document of peer review which contains
the list of all the comments given during the peer-review.
21. Slip age: the extra time to accomplish a task is known as slippage.
22. Escalation: it is a process of intimating the issue related information to the
next level of authorities usually if will be done level by level.
23. Metrics: it is defined as clear measurement of task.
24. Traceability Matrix: it is a document which contains a table of linking
information used for tracing back for the reference in any kind of confusion or
Questionable situation.
25. Prototype: it is a roughly & rapidly developed model which is used for
demonist rating to the client in order gather the clear requirements & also to
win the confidence of a customers.
26. Benchmark: it is a defined as the standard it which usually we compared.
27. Change Request: it is a process of requesting the changes by the customers
to the company to do the same usually the customer use change request
document.
Ex: change request template
28. Impact Analysis: it is processes of analysis how much impact will fall on the
already developed part if at all accept those new changes at that point of time.
29. Test suite: it is a combination of different types of test cases.
Ex: i. regress test case ii. Retest test case
30. Test Bed: it is a combination of test suite & test environment
31. Defect age: the time gap between the opening date & the closing date is
known as defect age.
32. Latent Defect: the defect found date after some releases is known as a
latent defect.
33. Walkthrough: it is defined as informal meeting conducted with the roles
either transfer the knowledge or to check something.
34. Code walkthrough: it is a process of checking conducted on the source
code document in order to conform whether it is developed according to the
coding standards or not.
crp.testing@gmail.com 91
35. Code Optimization or fine tuning: it is a process of reading the no.of lines
of code or the complexity in the code in order to increase the performance of
the application.
37. PPR (Periodic project report): it is a report prepared by the team lead before
the PPM is conducted by discussing with all of his team members related to all
of the above said points.
40. Patch: whenever the test engineer suspends the build then the developers
will rectify the problems & release the same build as patch.
crp.testing@gmail.com 92
LOAD RUNNER
Performance for the Load runner: there are 2 categories of testing where
usually the block box test engineers will involve.
1. Functionally testing 2. Non functionally testing
1. Functionally testing: in this category one will perform testing on the
functionality of the application
2. Non functionality testing: In this category of testing one will perform testing
on the non – functional areas followed.
I. Comparability testing
II. Installation testing
III. Usability testing
IV. Volume testing
V. Performance testing
Load testing: it is a type of testing in which one will apply some initial load,
gradually increases the load in order to find the critical load. Once the critical
load is found then they will comparative with the target load. If at all the critical
load gather than are equal to target load then it is concluded by the load test is
pass other wise fail.
Critical Load: the load beyond which application start degrade with performance
is known as critical load.
Target Load: the customer expected load is known as target load.
V - users
Analysis
Host
V – User generator: it is used for generating the basic script enhancing the script
checking whether the scripts properly or not and saving the script in terms
of a task.
L.R controller: it is vital compound of a l.r which is used for the following.
Controlling the whole load of a load testing process
Designing the scenario
Executing the scenario
crp.testing@gmail.com 94
Scenario: it is defined as a situational package which describes how many no.of
V-users
need to be generate to which machine perform what task and for how long
duration. (or)
Scenario is defined a simulated real time situation.
L.G 1
25 V-user
Main machine
T1
L.G3
L.G 2
10 V -users 15
V-user
T1
T1
Load Runner agent process: it will receive a request from the LR controller and
launch the LR agent.
LR agent: he is also widely it which will do the following
It will generate no.of requirements
It will make them re use the perform the required task
It will monitor each and re user during the execution
It will send the observed information back to the LR control semantically
Finally one the work is done it will kill the re-users.
Analysis: the analysis component will receive the consul dated raw result from
the L.R controller and converts them in to easy understandable report & graph
so that one can easily analyze the results.
Load Runner Life Cycle:
1. Load test planning
2. Creating the tasks
3. Designing the scenario
4. Executing the scenario
5. Analyzing the result
1. Load test planning: in this phase the load test lead will do the following.
2. Creating the Task: in this phase one will generate the basic script,
enhance the script& save it in terms of a task using virtual user
generator.
Once a new test is opened in virtual user generator we can find 3 blocks
in it
1. V- user init
2. Action
3. V-user – end
V-user in it: whenever any task to be performed only once in the starting of
execution then the related script need to be generated in the v-user init
block.
Action: whenever same task need to be performed repeatedly again &again for
same long duration then the corresponding script can be generated in the action
block.
V-user End: whenever a task need to be performed only once at the end of the
execution then the related script need to be generated in the V-user end block.
Operational over view of running: during the execution Load Runner will not do
any actions on the front end applications. It will send the equal ant request
directly to the server.
Navigation for showing the browser during replay:
Activate the menu item tool
Select the option general option
Select the display tab
Select the check box show browser during replay
crp.testing@gmail.com 96
Click on ok
Enhancements:
Transaction points: transaction points are provided for measuring request or
group of request.
Navigation:
Keep the cursor in desired location
Activate the menu item insert
Select the option start transaction
Specify the transaction name
Click on ok
Rendezvous point: rendezvous point is used for making all the V-users to
perform an action simultaneously.
Navigation:
Keep the cursor in the desired location
Activate the option Rendezvous
Specify the rendezvous point name
Click on ok
Check points: there are two check points inn Load Runner
1. Text check
2. Image check
1. Text check: it is used for checking whether the expected text is responding
by the server whenever it is under load.
Navigation:
Beep the cursor in the desired location
Activate the menu item insert
Select the option new step
Expand the web checks
Select the option text check
crp.testing@gmail.com 97
Click on ok
Specify the expected text
If required specify the right of & next of text
Click on ok
2. Image check point: it is used for checking whether th e expected image is
responded by the server whenever it is under load
Navigation:
Keep the cursor in the desired location
Activate the menu item insert
Select the option new step
Expand web checks
Select the option Image check
Click on ok
Specify the after native image name
Specify the image server file name
Click on ok
Navigation: 2
Activate the menu item V-user
Select the option “parameter list”
Click on new
crp.testing@gmail.com 98
Specify the parameter name
Click on create a table
Specify the values with the help of edit with note pad
Specify the column settings
Specify the now to select next row
Specify when to update value
Close the parameter list window
Select the constant value in script
Right click on it
Go to use existing parameters
Select the desired parameter name.
crp.testing@gmail.com 99
Replace the required constant with variable & write the following
steps on top of that web-req-save- para(“{ variable name}”, LB =
………..”, “RO = .”, LAST);
Think time: think time is just like wait statement in QTP which makes the V-
users wait between request & request In order to simulate the real usage of
server by real users.
Syn: lr-think-Time(17);
Navigation for replaying the think time:
.activate the menu item V-user
Select the option runtime settings
Select the option think time
Select the option replay think time & also sub options
Click on ok
Design the scenario: are can design the scenario using the design tab in the
controller
Navigation:
Click on add group
Specify the group name
Specify the V-user quantity
Specify the load generator name
Specify the task
Click on ok
Click on edit schedule
Select the one of following options
o Schedule by scenario
o Schedule by group
If at all schedule by scenario is selected do the ramp up, duration, ramp
down settings
If at all schedule by group is selected do the start time, ramp up, duration
& ramp down
Settings individually for every group
Set the scenarios start time
Click on ok
Executing the scenario: it can be done using the run tab in controller
crp.testing@gmail.com 100
Analyzing the results: analyzing the results can be done with the help of
analyze is component.
Once the analysis is done the load runner is provides facility to create the
reports.
Navigation:
Activate the menu item reports
Select the option Microsoft word report
Fill all the required field
Click on ok.
crp.testing@gmail.com 101
crp.testing@gmail.com 102