Escolar Documentos
Profissional Documentos
Cultura Documentos
Project is something that is developed based on particular customer requirements and for their
usage only.
Product:
product is something that is developed on the company specifications and used by multiple
customers.
The product based companies will first have general survey in the market gathers
requirements from different customers and based on common requirements of so many
customers they will decide the specification.
Quality is defined as not only justification of customer requirements and also the presence of
value (User Friendly).
Testing:
Testing is a process in which defects are identified isolated subjected for rectification and
ensured that the project is defect free in order to produce quality product and hence customer
satisfaction.
Bidding the project is defined as request for proposal estimation and signing off.
It is an initial meeting conducted in software company soon after the project is signed off
in order to discuss overview of the project and also Select a project manager.
Usually project managers, Technical managers, quality managers, high level management,
Test lead, Development lead and some times customer representative will be involved in this
meeting.
Note: apart from this meeting any kind of startup meeting can be considered as kick off
meeting .
It is mail prepared by project manager and sent to the CEO of the software company as well
as the core team members in order to intimate them they are about start the actual project
activities.
Analysis Phase:
Task: Feasibility study
Tentative Planning
Technology Select ion and Environment confirmation
Requirement Analysis
Roles: System Analyst Project Manager and Technical manager
Process:
Feasibility Study: It is detailed study conducted on the requirements in order to confirm
whether the given requirement is possible with in the given budget , time, resources.
Tentative Planning: In this section Resource Planning and Time Planning will be temporarily
done.
Technology Select ion and Environment Confirmation: The list of all technologies required for
accomplishing the project successfully will be analysed. The environment suitable for that
project will be Select ed and mentioned here.
Requirement analysis: The list of all the requirements that are required by that company to
accomplish this project successfully will be analysed.
Note: Requirements may be human resources softwares and hardware.
Proof: The proof document of the analysis phase is SRS (system requirement specification).
Design phase: Tasks: High level designing and Low level designing
Roles: high level designing is done by Computer Architect (CA) and Low Level designing is
done by Technical lead.
Process: The CA will divide whole project into modules by drawing some diagrams using
UML(Unified Modeling Language).The Technical lead will divide the modules into sub modules
by drawing using UML. In this Phase they will also GUI part of the application as well as
pseudo code developed.
Proof: The Proof document is Technical Design Document.
Pseodo Code: set of English instructions which will make the developers more comfortable
while developing actual source code.
Levels of Testing:
There are 5 levels of testing
1. Unit Level Testing
2. Module Level Testing
3. Integration Level Testing
4. System Level Testing
5. User Acceptance Testing
Module Level testing: Module: module is defined a group of related features to perform a
major task.
In this stage black box test engineers will test the functional part of module.
Integration Level testing: In this stage the developers will develop interfaces(linking
programs). In order to integrate the modules. The white box testers will test whether the
interfaces are working fine or not.
Developers will integrate the modules by following approaches
1. Top down approach: In this approach parent level module will develop first
then the related child modules will be integrated.
2. Bottom up approach: In this approach child modules will be developed first
and then Integrated back to the corresponding parent modules.
3. Sand witch or hybrid approach : this is a mixture of top down and bottom up
approach.
4. Big Bang Approach: In this approach will wait till all the modules are
developed and will integrate them at a time finally.
STUB: While Integrating the modules in top down approach if at all any mandatory module is
missing then that module is replaced with a temporary program known as Stub.
Driver: While Integrating the modules bottom up approach if at all any mandatory module is
missing then that replaced with a temporary program is known as driver.
System Level Testing: In this level the black box test engineers will conduct so many types
of testing like load testing, performance testing, stress testing, Compatibility testing, system
integration testing etc.
System Integration Testing: It is a type of testing in which one will perform some actions at
one module and check for the reflections in the related areas.
User Acceptance Level testing: In this stage the black box test engineers will test once
again the user desired areas in the presence of the user in order to make him accept the
application.
Environment:
Environment is defined as group of hardware components and some basic softwares which can
hold the business logic and presentation logic and database logic .
Or
Environment is a combination of presentation layer , Business layer and database layer which
can hold presentation logic business logic and database logic .
Types of environment:
There are 4 types of environments
1. Standalone Environment
2. Client Server Environment
3. Web Environment
4. Distributed Environment.
Stand alone Environment:
In this Environment all the three layers that is presentation, business and database layer will
be available in single tier.
Whenever the applications need to be used by single user at a time then one can suggest
this environment.
Client Server Environment: In this environment 2 tiers will be there one is for clients other
is for server Presentation layer business layer will be available in each and every client ,
database layer will be available in the server.
Whenever the application need to be used by multiple users sharing the common data in a
single premises and wants to access the application very fastly there is no problem with
security then one can suggest client server environment.
Web Environment: this Environment contain 3 tiers one is for client middle one is for
application server and the last one is for data base server. Presentation layer will be available
in the clients. Business layer will be available in the application server, database layer will be
date base server.
Whenever the application need to be used all over the world by limited no of people this
environment suggested.
Distributed Environment: this Environment is similar to the web environment but no. of
application servers are introduced in individual tiers in order to distribute the business logic so
that the load will be distributed & performance will be increased.
Whenever the application need to be used all over the world by huge no. of people then this
environment can do suggested.
Types of Testing:
2. Regression Testing: It s a type of testing in which one will perform testing on already
testing functionality again and again it is called as regression testing
Usually we do these 2 scenarios:
Whenever the tester identified the defect raise it to the developers , next build is released
then the test engineers will test defect functionality as well as related functionality.
Whenever some new featured are added , next build is released to the test dept. then test
engineers will test new functionality as well as related functionality.
3. RE Testing:
It is a type of testing in which one will perform same functionality again and again with
different set of values in order to confirm whether it is working fine or not.
Note: Re Testing start from first build and continuous up to last build.
Note2:Regression testing start from second build continuous up to last build.
During regression testing also retesting will be conducted.
4. Alfa Testing:
It is a type of user acceptance testing conducted in software company by the test engineer
just before delivering the application to the client.
5. Beta Testing: It is also User acceptance testing conducted in the client place either by
end user or third party testing experts just before implementing the application.
6. Static Testing: It is a type of testing in which one will perform testing on the application
or its related factors without doing any action
Ex: GUI Testing, Document Testing, Code Reviews etc.
7. Dynamic Testing: It is a type of testing in which one will perform testing on the
application or related factors by doing some action.
Ex: functionality testing.
8. Installation Testing: It is a type of testing in which one will perform install the
application into the environment by following guidelines provided in the deployment
document in order to confirm whether those guidelines are really suitable for installing
application in to environment or not.
9. Port Testing: It is a type of testing in which one will install the application in to the
original client environment and check whether it is compatible with that environment or
not.
10. Usability testing: It is type of testing in which one will test the user friendliness of the
application
11. Compatibility Testing: It is type of testing in which one will install the application in to
multiple environments prepared with different combinations in order to check whether the
application is suitable with those environments or not.
13. Exploratory Testing: Exploring: Having basic knowledge about some concept, doing
some thing and knowing more about the concept is known as exploring.
It is a type of testing in which the domain experts will perform testing on the
application without having knowledge on requirement just by parlally exploring the
functionality.
14. End to End Testing: It is a type of testing in which one will perform testing on the end to
end scenarios of the application
Ex: Login Balance Enquiry Deposit BE Logout this is one end to end scenario.
15. Security Testing: It is a type of testing in which one will check whether the application is
properly protected or not . To do the same the black box test engineer will perform the
following types of testing
1. Authentication Testing: In this type of testing one will perform different
combinations of user names and passwords and checks whether only the authorized people
are able to access the application or not .
2.Direct URL Testing : In this type of testing one will directly enter URL,’s of
secured pages in order to check whether secured pages are directly accessible or not without
login in to the application.
3. Firewall leakage or User Privileges Testing: In this type of testing one will enter
in to the application as one lever of user and try to access beyond the limits in order to check
whether firewalls are working properly or not
16. Mutation Testing: It is a type of testing in which one will perform testing on the
application or related factors by doing some changes to them.
17. Soak testing: It is a type of testing in which one will use the application continuously for
long period of time in order to check the stability of the application.
18. Ad-Hoc Testing: It is a type of testing in which one will perform testing in their own style
after understanding the requirements clearly.
Usually in the final stage of the project this type of testing can be
encouraged.
It contains 6 phases
1. test Planning
2. Test Development
3. Test Execution
4. Result Analysis
5. Bug Tracking
6. Reporting
Test Planning:
Plan: Plan is a strategic document which describes how to perform a task in an effective,
efficient and optimized way.
TestPlan: It is a strategic document which contains some information which contains how
to perform testing on an application in an effective , efficient and Optimized way.
Optimisation: it is a process of utilizing the available resources to their level best and
getting the maximum possible output.
Note: Test Plan is prepared by the test lead.
Contents Of the Test Plan
1. Indroduction
1.1 Objective
1.2 Reference Documents
2. Test Coverage
2.1 Featured to be tested
2.2 Features not to be tested
3. Test Stratagy
3.1 Levels of testing
3.2 Types of Testing
3.3 Test Design Techniques
3.4 Configuration Management
3.5 Test Metrics
3.6 Terminology
3.7 Automation Plan
3.8 List of automation Tools
4. Base Criteria
4.1 Acceptance Criteria
4.2 Suspention criteria
5. Test Deliverables
6. Test Environment
7. Resource Planning
8. Sheduling
9. Staffing & training
10. Risks & contegencies
11. Assumptions
12. Approval information
Introduction:
Objective: The purpose of the document will be clearly described in this section
Reference Documents: the list of all the test plan will be listed out in this section
Ex: Project plan , SRS, Meeting with project manager and Test manager.
Test Coverage:
Features to be tested: the list of all the features with in the scope and to tested will be listed
out here in this section
Features not to tested : The list of all the features that are not plan for testing will be here in
this section
1. Out off Scope Features
2. Low risk Features
3. Features that are planned to incorporated in future
4. Features that are skipped based on the time constraints
Test strategy:
It is a organizational level term which describes how to perform testing on all the projects in
that organization
Test plan: it is a project level term which describes how to perform testing on a particular
project in a detailed manner.
Levels of testing: the list of all the levels of testing that are maintained in that company will
be listed out in this section.
Types of testing: the list of all types of testing that are conducted in that company will be
listed out in this section.
Test Design Techniques: The list of all the techniques that are used in that company while
developing the test cases will be listed out in this section
EX: Boundary value Analysis, Equivalence class partition
Configuration Management:
Test Metrics : The list of metrics need to be maintained in that company during the test
process will be mentioned here in this section
Terminology: the list of all the terms along their meanings that are used in that company will
be used in this section.
Automation plan: the list of all the areas that are planned for automation will be listed out
here in this section.
Automation tools : the list of automated tools that are used in that company will be listed here
in this section
Base Criteria:
Acceptance Criteria: When to stop testing will be clearly mentioned in this criteria.
Suspension Criteria: when to suspend the build will be clearly mentioned in this
criteria.
Test Deliverables: The list of all the documents that are to be prepared during the testing
process will be mentioned here In this section
Test Environment: The clear details of the environment that is about to be used for testing the
application will be clearly mentioned here in this section.
Resource Planning :who has to do what will be clearly planned and mentioned here in this
section.
Scheduling: The starting date and the end dates of each and every task will be clearly
mentioned in this section.
Staffing and Planning: To Accomplish this project successfully any staff or training is required
then that information clearly mentioned in this section.
Assumptions: the list of all the assumptions need to be made by the testing people
will be mentioned here in this section.
Approval Information: who has developed the document. and when it is approved
will be mentioned in this section.
Test Development:
Requirement Document:
High level information
Low Level
informationUse cases
Snopshots Use case: Use case describes the functionality of certain
feature of an application in terms of actors, actions and
responses.
Functional requirements:
1) Login screen should contain Username, password , Connect to fields
Login ,Clear, Cancel buttons.
2) Connect to field is not mandatory field it should allow the user to Select
a data base option if required.
3) Upon entering username, password and clicking on login button the
corresponding page must be displayed.
4) Upon entering some information into any of the fields and clicking on
the clear button. all the fields must be cleared. And the cursor must be
available in the user name field.
5) Upon clicking on cancel button login screen must be closed.
Special requirements:
1) upon invoking the application Login and Clear button must be disabled.
2) Cancel must be enabled.
3) Upon entering some information in to any of the fields Clear button must be
enabled.
4) Upon entering some information both Username & Password filed Login Button
must be enabled.
5) Tabbing order must be Username, Password, Connect to , Login ,Clear, Cancel.
Explicit requirements:
• upon invoking the application Login and Clear button must be disabled.
• Cancel must be enabled.
• Upon entering some information in to any of the fields Clear button must be
enabled.
• Upon entering some information both Username & Password filed Login Button
must be enabled.
• Tabbing order must be Username, Password, Connect to , Login ,Clear, Cancel.
Pre conditions: Login screen must be available
Post conditions: either home page or Admin page for valid users and error msgs for
invalid users.
Flow of events:
Action
Action Response
The Guidelines to be followed by a test engineer soon after the use case document is
received.
Functional Point: the point where an user can perform some action in the
application can be considered as functional point.
Testing Process Related Documents:
Usecase Document Functional Point Test Scenario Test Cases
Defect profile Document.
DID TCID
1 1.0
2 1.0
3 1.1
Test Data:Test data should be developed by the user as well as the programmer and
must contain a sample of every category of valid data as well as many invalid
conditions as possible.
Test Execution:
In this phase the test engineers will do the following
Result Analysis:
In this phase the test engineer will compare actual value with the expected value if
both are matching then he will decide as pass or fail.
If at all test case not executed because of any reason the test engineer will keep
blocked in the result column.
Bug Tracking:
Bug tracking is a process of identifying ,Isolating and managing defects.
10. Priority: Priority describes the sequence in which defects need to rectified.
4 types of priorities
Critical (or) Pri1 (or) P1 (or) 1
High (or) Pri2 (or) P1 (or) 2
Medium (or) Pri3 (or) P1 (or) 3
Low (or) Pri4 (or) P1 (or) 4
Usually Fatal defects given to critical. Major defects will be given to high
Minor defects will be given to Medium
Suggestions will be given to Low.
But depending of the situation priority will be changed by the
development lead. Some time Highest seviority will given to the least priority and some
times least seviority will be given to the high priority.
Case1: Least seviority highest priority: When ever the customer will visit all the look
and feel . then we will give the look and feel defects highest priority.
Case2: Highest seviority least priority: When ever some part of the module of the
application is not released to the testing departments as it is under construction . the
testers will usually raise it as fatal defect. But the development will treat is as Least
Priority.
Bug Life Cycle:
NEW: Whenever the defect is newly identified by the tester he will set the status as
NEW.
OPEN: Whenever the Developer Accept the defect then he will set the status as OPEN .
DEFFRT: Whenever the developer accept the defects and wants to rectify in the later
stages then he will set the status as DEFFRT
FIXED: Once the defect is rectified then the developer will set the status as Fixed.
Re-Open and Closed: Once the next build is released the tester will check whether the
defect is really rectified or not . if at all the defect is really rectified then he will set the
status as closed otherwise Reopen.
Hold: whenever the developer confused to accept or reject the defect then he will set
the status of as hold whenever the status is hold there will be a meeting on that defect if
it is decided as defect then the developers will set the status as open otherwise closed.
Rejected: whenever the developer feel that it is not at all a defect then they will set the
status as rejected.
Whenever the defect is rejected then the test engineer will once again check it. If
at all they also feel it is not a defect then they will set the status as closed otherwise
reopened.
As Per desire: (situation rarely occurs): Whenever the developers feel the tester are
not aware of latest requirement then they will set as status as per desire.
Whenever the defect is this status the testers will once again checked it by going through
the latest requirement if at all they also feel it is as per desire then they will set the status
as closed otherwise reopened.
Reporting:
Hold
Reject
As Per
desredesir
ed
Requireme
ntnts
Is it Op
reall en
Developer y
defe
ct
APP Rectification
Fi
xe
Testing d
N
E IF
W Defec Stop The test
tIs
Def
ectr
eall yes Clos
Re - y ed
Ope Rec
n
tifie
d
Terminology:
Defect Product: if at all the product is not satisfying some of the requirements but still is
usable then such type of product then it is known as defect product
Defective product: if at all the product is not satisfying some of the requirements as well
as is not usable then such type of products are known as defective products
Quality Assurence: Quality Assurence is department which checks each and every role in
the organization in order to confirm whether they are working according to the
companies process guidelines or not.
Quality Control: it is a department which checks the developed product or its related parts
are working according to the requirements or not.
NCR: Whenever the role is not following the process the penalty given for him known as
NCR.
Audit: Audit is a process of checking conducted on the roles and departments with prior
intimation well in advance
Corrective action: whenever the role has committed a reparable mistake then the
corrective actions will be taken care in order to correct such type of mistake .
Prventive action: Whenever the role was committed irreparable mistake then the
preventive actions will be taken care in order to prevent such type of mistakes in future.
Common repository:
It is basically a server which can be accessed only by the authorized people where in
they can store the information and retrieve the information
Check In : check in is a process of uploading the information in to a common
repository.
Check Out: Check out is a process of downloading the information from common
repository.
Delivery: It is a process of sending the application from the company t the client or
from the market to the client.
Test Suit: Combination of all different types of test cases is known as test suit.
Defect Age: the time gap b\w opening date and closing date is known as defectage.
Latent Defect: the defects that are found late after some releases are known as latent
Defect.
Slip age: the extra time taken to accomplish a task is known as Slip age.
Bench Mark: the standard with which usually we compare with is known as
benchmark.
WalkThrough: walk through is defined as informal meeting between two or more roles.
May be for checking something or Transferring knowledge.
Varification : verification is a process of checking each and every role in the organization
in order to confirm whether they are working according to the company process
guidelines or not.
Validation: Validation is a process of checking conducted on the developed product or its
related parts in order to confirm whether they are working according to the expectations
or not.
4. What is Testing Measurements and Metrics explain in detail? What is the need of
this in the Test Strategy document?
5. Test cases for Password cannot be used for next 13 times? 2.Test cases for
Password should not be less than 8 to 13 chars and there should be at least one
special character and one Capital letter.
6. What is suspension & resumption criteria in Test Plan please explain with
example ?
7. Give me an example when black box testing will not able to detect a bug which
white box will detect?
8. What is Risk Mitigation and who will involve in Risk mitigation plan?
9. What all document are required to testing?
10. can anybody send me the test cases apart from application form?
11. What is Test Strategy and Test Plan.. what is the Diff. between those?
12. what is manual testing process
13. How can we know bug is reproducible or not?
14. Explain the difference between integration testing and system testing with real
time examples?
15. what is test summery report ?please explain?
16. what is test coverage??
17. what is regression testing???
18. when we will give test data while writing test cases r during executing test cases
for both positive and negative cases we give test data
19. when test plan is created?
20. Explain about V model?
21. what is the different between application server and database server?
22. What is Statement Testing
23. What is Defect Leakage? What Gap Analysis? What are the functional
requirements to test the Software? What is Latency bug?
24. who will give priority for test case?
25. what is the purpose of writing test cases?
Automation Testing
Ways of testing : there are two ways of testing
1. Manual Testing
2. Automation Testing
Manual Testing:
Manual Testing is a process in which all the phases of software testing life cycle like test
planning, test development, Test Execution, Result Analysis, Bug tracking & reporting
are accomplished successfully manually with the human efforts.
Automation Testing:
Automation testing s a process in which all the drawbacks of manual testing are
addressed properly and provides speed and accuracy to the existing process.
Note: Automation test is not a replacement for manual testing it is a just continuous for
manual testing
Automation is recommended to be implemented only after the application has come to
stable stage.
Introduction of QTP
Type of the Tool: Functional tool
Company: Mercury Interactive incorporation and taken over by HP
Scripting language: VB Script(It can understand other scripting languages also by doing
some internal configuration)
Versions: 5.5, 6.5, 7.0, 7.6, 8.0, 8.2, 9.0, 9.1, 9.2, 9.5, 10.0
Anotomy of QTP:
Add In Manager:
It is a feature provided by the QTP which is used for making the QTP compatible with
the desired environment.
Add in Manager will show the list of all the available Add Ins while opening the QTP. So
that one can Select the desired Add In and make the QTP compatible with those
environment.
With the default purchase of QTP 3 built-in Add ins will be provided
1. active x
2. Visual basic
3. Web
By default always QTP will be compatible with the standard windows environment.
Apart from the above Add ins any other add-ins are required one need to purchase
them separately.
Note: HP people give single license for all the add-ins
Parts Of QTP:
Test Pane: It is an area provided by QTP Which is used for developing ,Viewing and
modifying the test script.
Test pane shows 2 views
1. Expert View
2. Keyword View
Active Screen: It is an area provided by the QTP which holds the snapshots
related to each and every recorded statement and used for easily understanding
and enhancing the script.
Navigation: Activate the Menu Item Automation Select the option record and run
setting Select the desired environment tab Select the required option and click on
OK.
Recording Modes:
There are 3 types of recording modes
1. Normal recording Mode
2. Analog recording mode
3. low level Mode
Normal recording Mode: Normal recording mode is used for recording the operation
performed on the standard GUI options in different context.
Analog recording Mode: Analog recording Mode is used for recording the continuous
operation
Navigation:
keep the tool under normal mode activate the menu item Automation Select
the option analog recording
Select one of the following
o Record related to the screen
o Record related to the following window.
If at all second option is Select ed then specify the window title with the help of
hand button.
click on start analog button
Low Level recording: It is a special recording mode provided by the QTP which is used
for recording at least some operations on the non supported environments also. usually
people avoid using this mode due to following reasons.
1. All the operations cannot be recorded
2. The script is not easily understandable and enhancing.
Object Repository
Object Repository is a storage place where one can store the object information and it
acts as an interface between test script and AUT (application under testing) in order to
identify the objects during execution.
Shared Repository: Whenever we feel that some common object information need to be
shared by so many actions present in different test then it is suggested to create a shared
repository with that common information and associate it to all the required actions.
By doing like this the advantage is if any modifications are required in future then it is
very easily.
Navigation for create Shared Repository whenever Information already available in the
Local Repository:
Open the Object repository
Activate menu item file in the object repository
Select the export local object
browse the desired location and save it with .tsr extention.
Navigation Associating a Shared Repository to an action
Activate the Manu Item resources
Select the option association repository
Add the Required repositories to the list
Select the desired repository in the list
Select the desired action
Click on Associate Button Click on Ok.
Note: we can associate one or more shared repositories to an action apart from its local
repository.
Highlight in application: this option is used for highlighting the corresponding object in
the application upon Select ing the object name in the object repository.
Locate In Repository: This option is used for locating the object name in the Object
Repository upon specifying the corresponding object in the application.
Object Identification
QTP will Learn the information in the following way in case only normal
Identification:
First of all QTP will learn all the mandatory properties, it will think those properties are
sufficient or not if it feels not sufficient then it will learn first assistive property and then
once again think whether all those properties are sufficient for identifying the object
uniqly if it feels not sufficient it will learn the second assistive property and once again
think whether they are sufficient or not if not sufficient then it will repeat the same
process by learning the next assistive properties one by one till it feels satisfied.If at all
assistive properties are learn still QTP feels not satisfied then finally it will learn the
ordinal identifier.what ever learn during the above process will be stored in the object
repository.
QTP will Learn the information in the following way in case of Smart Identification:
QTP will learn all the mandatory properties all the base filter properties and all the
optional filter properties at a time stores base and optional filer properties in a secrete
place and will not think about again. Then It will think whether the mandatory properties
are sufficient for identifying the object uniquely if it feels not sufficient it will learn first
assistive property and the continuous the process of Normal Identification.
QTP will use the information in the following way during the identification:-
First of all it will use all the properties present in the object repository and will try to
identify the object. If it fails it will use the smart identification mechanism and will try to
identify object freshly as follows First it will use base filter properties and will try to
identify the object if at all more than one objects are found it will consider those objects
and filters the remaining objects. It will take the first optional filter property and will try
to identify the object in the considered objects if at all more than one matches are found
then it will consider those objects and filters the remaining objects then it will take
second optional filter property and repeats the same process till it finds exactly one
match.
In case all the optional filter properties used but QTP unable to find exactly one match
then it will go object repository and check whether ordinal identifier is there or not . if it
is available using this it will roughly identify the object otherwise hands up.
Location: whenever the location is Select ed ordinal identifier QTP will generate some
numbers like 0,1,2,3……. Based on the sequence of the objects located in the application
Index: whenever the Index is Select ed ordinal identifier QTP will generate some
numbers like 0,1,2,3……. Based on the Index of the Programs related to those objects.
Navigation for Object Identification Configuration: Activate the menu item Tools
Select the option Object Identification Select the desired environmentSelect the
desired class of the object specify the required property in mandatory list assistive list
Select ordinal identifier if at all smart identification also required then Select the
checkbox enables smart identification click on configure button specify base and
optional filter properties click on Ok.
Object Spy
Object Spy is a handy feature provided by the QTP which shows the complete object
information like list of properties and methods , syntax of methods and descriptionof
methods of both current run time objects then and there on the spot immediately.
Navigation: Activate the menu item ToolsSelect the object spy specify the
desired object in the application with the help of Hand icon.
Types of Objects:
Runtime Objects
Test Objects
Runtime Objects: All the Original objects present in the application are known as run
time objects.
Test Objects: The reference objects for the original objects in the object repository. Are
known as Test Objects.
QTP LIFE CYCLE
1. Test planning
2. Generating the Basic Test
3. Enhancing the Test
4. Debugging the Test
5. Executing the Test
6. Analyzing the results
Test planning: In this phase the automation test lead will do the following
1. He will understand the requirements
2. He will identify the areas to be automated
3. He will analyze both the positive and negative flow of the application
4. He will Analyze the dynamism of the application based on that he will d all the
configuration settings to the tool in such away that it will be compatible to the
application.
5. He will do the resource planning
6. He will do the scheduling
7. He will prepare the automation plan document with the above analyzed
information.
Generating the Basic Script: In this phase one will generate the basic script for the
both the positive and negative flows of the application.
1. Check Points: Check point is a feature provided by the QTP which is used for
checking the during the execution at any point of time
Standard check point : standard check point is used for standard GUI objects
properties values. It can be inserted in two ways
Through application and through active screen
Navigation Through Application:
keep the tool under recording mode activate the menu item Insert got o
check pointSelect the option standard check point specify the desired object
in the application click on okSelect the desired properties to be check and
specify the desired expected values click on Ok stop recording .
Navigation through Active screen: keep the cursor on the desired statement
so that the corresponding snopshot will be available the active screen Go to
active screen right click on the desired object Select the option insert standard
check pointclick on ok Select the desired properties to be check and specify
the desired expected valuesSelect one of the following options
O Before current step O After current step
click on Ok.
Bit map check point : Bit map check point is used for checking whether the
expected pixels are present in the Select ed area of the application or not.
Bit map check point is used for checking the complete bitmap or part of the bit
map.
Navigation through Active screen: keep the cursor on the desired statement
so that the corresponding snopshot will be available the active screen Go to
active screen right click on the desired object Select the option insert bit map
check point click on ok If require Select the desired part of the bit map
using the Select area button Select the check box only check Select ed area
Select one of the following options
O Before current step O After current step
click on Ok.
Text check point: text check point is used for checking the text present on the
specified object. It can be inserted through application as well as active screen
Navigation Through Application:
keep the tool under recording mode activate the menu item Insert go to
check pointSelect the option Text check point specify the desired object in the
application click on okSelect the desired properties to be check and specify the
desired expected values click on Ok stop recording.
Navigation through Active screen: keep the cursor on the desired statement
so that the corresponding snopshot will be available the active screen Go to
active screen right click on the desired object Select the option insert Text
check pointclick on ok Select the desired properties to be check and specify
the desired expected valuesSelect one of the following options
O Before current step O After current step
click on Ok.
Text area Check point: It is used for checking the text present in a specified
area of the application it can be inserted only through application
Navigation Through Application:
keep the tool under recording mode active the menu item Insert go to the
check point Select the text area check point Select the part of the text in
the application click on ok stop recording
Data Base check point: it is used for checking the contents of a database
Navigation: activate the menu item Insert go to check point Select the
option data base check point Select the option specify SQL statement manually
click on nextclick on Create click on new Select the desired driver in
the listclick on the next click on finish click on Select browse the desired
database-> click on Ok once again click on Ok once again click on Ok
specify the required SQL statement click on finish Select the desired
content to checked Select one of the following option
O Before current step O After current step
click on Ok.
XML Check point: it is used for checking the XML contents of 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
specify the required expected value Select one of the following option
O Before current step O After current step
click on Ok.
Synchronization:
Synchronization is process of matching the speed of the tool and the
application in order to keep them insink with each other to obtain proper testing results.
Here the main concept is making the tool to wait till the application finished its work to
do the same we can follow any of the way
1. Inserting the synchronization point statement
2. Increasing the default time
3. Inserting the wait statement.
Navigation for Inserting the Synchronization point:
Keep the cursor desired location
keep the tool in recording mode
Activate the menu item Insert
Select the synchronization point
Specify the desired object in the application
click on ok
Select the desired property name, value and extra time in milliseconds
click on Ok. Stop recording
Ex:
Window(“Flight Reservation”).winButton(“Delete Order”).wait Property “enabled”, true,
14000
To avoid the above navigation parameterize done manually in the following way
Example:
X=DataTable(“V1”,1)
Vbwindow(“CALC”).VbEdit(“value1”) .set X
Vbwindow(“CALC”).VbEdit(“value2”) .set DataTable(“V2”,1)
Vbwindow(“CALC”).VbEdit(“ADD”) .click
Output Values:
Out put value is a feature provided by QTP which is used for capturing a value from an
application or from a database or XML file and store it under a desired column in the run
time data table.
Navigation:
Keep the cursor in desired location
Activate the menu item Insert
Select the option Start Transaction
Specify the desired name
Select the one of the following option
O Before Current step O After current step
click on Ok.
Note: we can invoke the application with the help of invoke application
Invoke application ”path of the application”
Reporter utility:
It is used for sending an extra result step to the result window
*syntax:
Reporter.ReportEventstatus,”name”,”Details or Msg”
Reporter.Report Event MicDone,” myrep”, “ Add operation successful”
Status:
0 Pass
1Fail
2 Done
3Warning
Debugging the Test: Debugging is a process of executing the script in a user desired
fashion with some temporary breaks in order to identify the errors
To do the same QTP provided break point feature and step commands
Break point: It is a feature provided by QTP which is used for breaking the execution
temporarly
Step Commands:
1. Step Into: step into used for executing a single step if that step is a function call
step then it will make the pointer step in to the function and break the execution at
the first statement.
2. Step Out : step out is used only after entering in to the function it will execute all
the remaining statements inside the function position of the pointer and breaks the
execution after stepping out of the function
3. Step Over: this statement is used for execution any step until it is finished
Ex: if it is function call statement it will execute all the statements and then breaks
the execution
4. Run to Step: this is used for executing all the statements up to the before
statement where the cursor is available.
5. Debug from the step: This is used for bringing the pointer to a desired
statements without executing any of the previous statement.
Debug Viewer Pane: It is an area provided by QTP which is used for Viewing,
Modifying or setting the current values of variables or expression during the
execution break with the help of 3 tabs by name 1)watch 2) variable 3 )Command
Recovery Scenarios:
During the execution some times QTP may face some problematic situation where it
need to recover itself and should continue the execution.
To do the same test engineer need to define a solution well in advance and attach it
to the corresponding test before starting the execution
Usually QTP may face following types of problems
1. problems related to popup window
2. problems related to object state
3. problems relates to Test script execution
4. problems related to application crash
To define the solutions to above problems QTP provided 4 trigger events
1. popup window
2. Object state
3. Test run error
4. application crash
Navigation for Object state:
activate the menu item Resources
Select the option recovery scenario manager
click on new scenario
click on next
Select the trigger event for object state
click on next
specify the desired object in the application
click on next click on next
specify the required property
click on next
specify the recovery operation as function call
click on next
browse the desired library file
specify the desired function name
write the required script inside the function
click on next
remove the check box add another recovery operation
click on next
specify the desired post recovery option
click on next
specify the scenario name
click on next
Select the required check box
Add Scenario current
Add scenario to default test settings
click on finish
save the file with .qrs extention
click on close
Frame Works:
Frame work is defined as a generic work or a set of guide lines to perform a task in an in
an effective , efficient, optimized way
Action
Types of Actions
1. Normal Action
2. Reusable Action
Reusable called in another test is known as External actions
External actions are non editable
Automation Testing Process with keyword driven Framework: create the folder structure
as follows
Projectname_Automation
Test Data
Repositories
Library files
Recovery scenarios
Environment variables
Test
Log file
1. Develop the Required Test data file save them in corresponding folder
2. Develop the Required Repository file save them in corresponding folder
3. Develop the Required Library files save them in corresponding folder
4. Develop the Required Recovery scenario files save them in corresponding folder
5. Develop the Required Environment file save them in corresponding folder
6. Open the Main Test and associate all the required resources
7. develop the script in such away that it is executed based on the keywords
specified in the data table
8. save the script in corresponding folder
9. whenever required open the script specify the desired keywords execute the script
10. analyze the Result
Example:
Var=datatable(“keys”,1)
Select case var
Case “K1”
Call LogIn
Insord()
Logout()
Case “K2”
Login()
Openord()
Logout()
Case “K3”
Login()
Logout()
End Select
Hybrid Framework:
Mixture of any two or more frameworks is known as hybrid frame work
Library Files: Library file is an area provided by the QTP where we can develop and
store the User defined Function
2nd way
Activate the Menu Item New
Select the option function library
develop all the required functions
save it with .QFL or .vbs extention
QFL: Quick Function Library
3. Wait property: It is used for making the tool to wait based on the object
properties value or up to the maximum time
Syntax: object hierarchy.waitproperty “Proprty name”,Property value, time in
milliseconds
4. Wait: wait statement is used for making the tool to wait till specified time is
elapsed.
Syntax: Wait(time in seconds)
5. Click: click method is used for clicking on a desired object
Syntax: Object hierarchy.click[x,y,[button]]
6. Dbl Click: dbl click is used for double clicking on a desired object
Set: set method is mainly used for performing the operations on the following options
1. Edit box
2. Check box
3. Radio button
Edit Box: set method is used for setting any value to the edit box
Syn: Object hierarchy.set “value”
Check box: set method is used for Select ing or deSelect ing the check box
Syn: Object hierarchy.set “on”\”off”
Radio Button:set method is used for Select ing a radio button in a group of radio
buttons
Syn: Object hierarchy.set
Select : Select method is used for Select ing an item in combo or list box.
Type: Type method is used for performing the keyboard related operation
Syn: Object hierarchy.type keyvalue
Ex: Object hierarchy.type micTab
Setsecure: set secure method is used for setting the encrypted data in to the edit box
Syntax: Object hierarchy.setsecure “encrypted string”
To generate the encrypted string QTP has provided a special tool by name Password
encoder
Navigation for Password Encoder: start programs QTPTools Password
Encoder
Get RO Property:
Get RO property is used for getting the run time objects properties values during the
execution
Syn: var= Object hierarchy.getRoproperty(“Property name”)
Get TO Property:
Set To Property :
Set To property is used for setting the test objects Properties value temporarily during
the execution time.
Case study 10: develop the script for clicking on a button 3 times whose text property
value is changing from Start to Stop and Stop to Start Dynamically
Form1
Start
Vbwindow(“Form1”).vbbutton(“dbutton”).click
Vbwindow(“Form1”).vbbutton(“dbutton”).setTo property “text” “Stop”
Vbwindow(“Form1”).vbbutton(“dbutton”).click
Vbwindow(“Form1”).vbbutton(“dbutton”).set To property “text” “ Start”
Batch Testing; Batch Testing is provided in QTP used for executing a group of script
file continuously at a time do the same QTP has provided a special tool by name test
batch runner. we can create the batch files and execute them confortably.
Batch file extension is .mtb (Mercury Test batch)batch testing concept is usually used
during regression testing
Navigation for Test batch runner
start programs QTPTools test batch runner
Data TableMethods:
Data table methods are used for making the QTP perform operations on the runtime
datatable during the execution
• Add Sheet: It is used for adding an extra sheet to the run time datatable
Syntax: datatable.Addsheet “ sheetname”
• 2.Delete sheet: it is used for deleting a specified sheet from the runtime datatable
Syntax: datatable.deletesheet “ sheetname”
• Import: it is used for importing the complete data present in a excel file to the
runtime table
Syntax: datatable.import “Path of the excel file”
• Import sheet: it is used for importing the exporting the specified sheet of data
from excel file to the runtime table
Syntax: datatable.importsheet “Path of the excel file”,Sourcesheetid,destination
sheetid
• Export: it is used for Exporting the sheets of data present in a runtime datatable to
an excel file
• Export sheet: it is used for exporting the specified sheet of data from runtime
table to the excel file
• Set Current Row: it is used for making the QYP focus on a specified rule
Synatax: datatable.setcurrentrow(row number)
• 8.SetNextRow: it is used for making QTP focus on the next row of the currently
focused row.
Syntax: datatable.SetNextRow
• Set Prev Row: it is used for making QTP focus on the Previous row of the
currently focused row.
Syntax: datatable.SetPrevRow
• Value: it is used for getting a cvalue from the specified column,currently focused
row.
Syntax: var=datatable.velue(“column name”,sheet id or name)
Ex:
Datatable.Addsheet”suresh”
Datatable.Importsheet “d:\fl_auto\td\td1.xls”,1,3
n = datatable.getsheet(3).getrowcount
for i = 1to n
vbwindow(“calc”).vbedit(“value1”).set datatable(“v1”,3)
vbwindow(“calc”).vbedit(“value2’).set datatable(“v2”,3)
vbwindow(“calc”).vbbutton(“Add”).click
actval= vbwindow(“calc”).vbedit(“Result’).getRoproperty(“text”)
expval=datatable.value(“ev”,3)
if(cint(expval)=cint(actvalue))then
reporter.reportevent 0,”my rep” “add operation is successful”
datatable(“res”,3)=”pass”
else
reporter.reportevent 0,”my rep” “add operation is successful”
datatable(“res”,3)=”fail”
End if
Next
Datatable.exportsheet “d:\fl_auto\Log\Logfile2.xls”,3
Datatable.deletesheet “suresh”
Check Syntax: check syntax is a feature provided by QTP used for checking the sytax
in our script or program
Information Pane: it is an area provided by QTP which is used for viewing the
syntax related information during the syntax check
Missing resources pane: While opening any test if at all any attached resources are
missing then that information will be shown in the missing resources Pane
Navigation:
activate the Menu item Tools
Select the option new virtual object
click on Next
Select the desired standard class
click on next
Mark the Object
Select the one of the following options
O entire parent O parent only
click on next
specify the object name
specify the collection name
click on finish
Virtual object manager is used for creating and managing virtual objects
Regular Expressions:
Whenever the QTP is enabled to identify the object due to regular changes its
properties value dynamically. Then to solve that problem one need to replace the
corresponding constant value in the object repository with a suitable expression’
Navigation:
open the Object Repository
Select the desired object
Select the desired property value
click on configure the value button
Replace the constant value with suitable regular expression
Select the check box regular expression
Input Output parameter is a concept provided by the QTP which is used for passing
the values in to the action returning the values from the action
vbwindow(“calc”).vbedit(“value1”).set Parameter(“a”)
vbwindow(“calc”).vbedit(“value1”).set Parameter(“b”)
vbwindow(“calc”).vbbutton(“Mul”).Click
var1= vbwindow(“calc”).vbedit (“Result”).getproperty (“text”)
Parameter(“e”) var1
Example for calling an action by passing input values and specifying the variables for
catching the return values.
This is a concept provided in QTP used for associating and removing the object
repositories during the execution dynamically.
EX: reppath=”d:\rep144.tsr”
Repositoriescleection.RemoveAll
Repositoriescleection.add(reppath)
vbwindow(“calc”).vbedit(“value1”).set “10”
vbwindow(“calc”).vbedit(“value1”).set “20”
vbwindow(“calc”).vbbutton(“Add”).Click
var= Repositoriescleection.find(reppath)
Repositoriescleection.Remove(var)
Dim qtapp
Dim qttest
Set qtapp=createobject(“Quick test.Application”)
qtapp.launch
qtapp.visible=true
qtapp.open ”d:\aom1”,true
set qtttest =qtapp.test
qttest.run
qttest.close
qtapp.open “d:\aom2”, true
set qttest=qtapp.test
qttest.run
qttest.close
qtapp.quit
Dim con,rs
Set con=createobject(“adodb.connection”)
Set rs=createobject(“adodb.recordset”)
Con.privider=”Microsoft.jet.oledb.4.0”
Con.open “d:\testdata.mdb”
Rs.open “Select * from info”,con
Descriptive programming:
If at all object description is described in the program itself then that is known as
descriptive programming
First style of descriptive programming (Static descriptive programming)
Dialog(“text:=Login”,”width:=320”).Activate
Dialog(“text:=Login”,”width:=320”).winedit(“attached text:=AgentName:”).set “suresh”
Dialog(“text:=Login”,”width:=320”).winedit(“attachedtext:=Password:”).setSecure“sure”
Dialog(“text:=Login”,”width:=320”).winbutton(“text:=Ok”).click
set=description.crate
an(“attached text”).value=”AgentName”
set pw description.create
pw(“attached text”).value=”Password”
set ok description.create
ok(“attached text”).value=”Ok”
Dialog(lin).Activate
Dialog(lin).winedit(an).set “suresh”
Dialog(lin).winedit(pw).set “suresh”
Dialog(lin).winbutton(ok).click
Define the objects description in the library file attached the library file to the required
test develop the script as follows
set=description.crate
an(“attached text”).value=”AgentName”
set pw description.create
pw(“attached text”).value=”Password”
set ok description.create
ok(“attached text”).value=”Ok”
Then take a new test and attach the library file and then develop the script
Dialog(lin).Activate
Dialog(lin).winedit(an).set “suresh”
Dialog(lin).winedit(pw).set “suresh”
Dialog(lin).winbutton(ok).click