Software Testing
Software Testing
Ajitha Kruthiventy, Amrish Shah, Ashna Datye, Bharathy J, Deepa M G, James M, Jayapradeep
J, Jeffin Jacob M, Kapil Mohan Sharma, Leena Warrier, Mahesh, Michael Frank, Muhammad
Kashif Jamil Narendra N, Naveed M, Phaneendra Y, Prathima N, Ravi Kiran N, Rajeev D, Sarah
Salahuddin, Siva Prasad B, Shalini R, Shilpa D, Subramanian D Ramprasad, Sunitha C N, Sunil
Kumar M K, Usha Padmini K, Winston George and Harinath P V
Copyright (c) SofTReL 2004. Permission is granted to copy, distribute and/or modify this
document under the terms of the GNU Free Documentation License, Version 1.2 or any
later version published by the Free Software Foundation; with no Invariant Sections, no
Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the
section entitled "GNU Free Documentation License".
Revision History
Ver. No. Date Description Author
0.1 06-Apr-04 Initial document creation Harinath, on behalf
of STGB Team.
0.2 01-May-04 Incorporated Review Comments Harinath, on behalf
of STGB Team.
0.3 03-July-04 Draft Release Harinath, on behalf
of STGB Team
http://www.SofTReL.org 2 of 142
Software Testing Guide Book Part I: Fundamentals of Software Testing
Table of Contents
9.3 Inspection..............................................................................................35
10. Testing Types and Techniques......................................................................36
10.1 White Box Testing................................................................................38
10.1.1 Basis Path Testing...........................................................................................42
10.1.2 Flow Graph Notation......................................................................................42
10.1.3 Cyclomatic Complexity..................................................................................42
10.1.4 Graph Matrices................................................................................................42
10.1.5 Control Structure Testing................................................................................43
10.1.6 Loop Testing...................................................................................................43
10.2 Black Box Testing ...............................................................................44
10.2.1 Graph Based Testing Methods........................................................................45
10.2.2 Error Guessing................................................................................................45
10.2.3 Boundary Value Analysis................................................................................45
10.2.4 Equivalence Partitioning.................................................................................46
10.2.5 Comparison Testing........................................................................................47
10.2.6 Orthogonal Array Testing................................................................................47
11. Designing Test Cases....................................................................................47
12. Validation Phase...........................................................................................48
12.1 Unit Testing.........................................................................................48
12.2 Integration Testing...............................................................................53
12.2.1 Top-Down Integration.....................................................................................53
12.2.2 Bottom-Up Integration....................................................................................53
12.3 System Testing....................................................................................54
12.3.1 Compatibility Testing......................................................................................54
12.3.2 Recovery Testing.............................................................................................55
12.3.3 Usability Testing.............................................................................................55
12.3.4 Security Testing...............................................................................................58
12.3.5 Stress Testing..................................................................................................58
12.3.6 Performance Testing ......................................................................................58
12.3.7 Content Management Testing.........................................................................68
12.3.8 Regression Testing .........................................................................................68
12.4 Alpha Testing.......................................................................................71
12.5 User Acceptance Testing......................................................................72
12.6 Installation Testing..............................................................................72
12.7 Beta Testing .......................................................................................73
13. Understanding Exploratory Testing...............................................................73
14. Understanding Scenario Based Testing..........................................................90
15. Understanding Agile Testing.........................................................................91
16. API Testing...................................................................................................96
17. Understanding Rapid Testing......................................................................103
18. Test Ware Development .............................................................................. 105
18.1 Test Strategy......................................................................................105
18.2 Test Plan...........................................................................................108
18.3 Test Case Documents........................................................................114
19. Defect Management....................................................................................120
http://www.SofTReL.org 4 of 142
Software Testing Guide Book Part I: Fundamentals of Software Testing
http://www.SofTReL.org 5 of 142
Software Testing Guide Book Part I: Fundamentals of Software Testing
Forward
Software Testing has gained a phenomenal importance in the recent years in the
System Development Life Cycle. Many learned people have worked on the topic and
provided various techniques and methodologies for effective and efficient testing.
Today, even though we have many books and articles on Software Test Engineering,
many people are fallacious in understanding the underlying concepts of the subject.
Software Testing Guide Book (STGB) is an open source project aimed at bringing the
technicalities of Software Testing into one place and arriving at a common
understanding.
This guide book has been authored by professionals who have been exposed to Testing
various applications. We wanted to bring out a base knowledge bank where Testing
enthusiasts can start to learn the science and art of Software Testing, and this is how
this book has come out.
This guide book does not provide any specific methodologies to be followed for Testing,
instead provides a conceptual understanding of the same.
Regards,
The SofTReL Team
http://www.SofTReL.org 6 of 142
Software Testing Guide Book Part I: Fundamentals of Software Testing
About SofTReL
The Software Testing Research Lab (SofTReL) is a non-profit organization dedicated for
Research and Advancements of Software Testing.
The concept of having a common place for Software Testing Research was formulated in
2001. Initially we named it ‘Software Quality and Engineering’. Recently in March 2004,
we renamed it to “Software Testing Research Lab” – SofTReL.
Professionals who are currently working with the industry and possess rich experience
in testing form the members of the Lab.
Visit http://www.softrel.org for more information.
http://www.SofTReL.org 7 of 142
Software Testing Guide Book Part I: Fundamentals of Software Testing
Authors
The guide book has been authored by professionals who ‘Test’ everyday.
Ajitha Kruthiventy - GrayLogic Corporation, New Jersey, USA
Amrish Shah - MAQSoftware, Mumbai
Ashna Datye - RS Tech Inc, Canada
Bharathy Jayaraman - Ivesia Solutions (I) Pvt Limited, Chennai
Deepa M G - Ocwen Technology Xchange, Bangalore
James M - CSS, Chennai
Jayapradeep Jiothis - Satyam Computer Services, Hyderabad
Jeffin Jacob Mathew - ICFAI Business School, Hyderabad
Kapil Mohan Sharma - Pixtel Communitations, New Delhi
Leena Warrier – Wipro Technologies, Bangalore
Mahesh, iPointSoft, Hyderabad
Michael Frank - USA
Muhammad Kashif Jamil, Avanza Solutions, Karachi, Pakistan
Narendra Nagaram – Satyam Computer Services, Hyderabad
Naveed Mohammad – vMoksha, Bangalore
Phaneendra Y - Wipro Technologies, Bangalore
Prathima Nagaprakash – Wipro Technologies, Bangalore
Ravi Kiran N - Andale, Bangalore
Rajeev Daithankar - Persistent Systems Pvt. Ltd., Pune
Sarah Salahuddin - Arc Solutions, Pakistan
Siva Prasad Badimi - Danlaw Technologies, Hyderabad
Shalini Ravikumar - USA
Shilpa Dodla - Decatrend Technologies, Chennai
Subramanian Dattaramprasad - MindTeck, Bangalore
Sunitha C N - Infosys Technologies, Mysore
Sunil Kumar M K – Yahoo! India, Bangalore
Usha Padmini Kandala - Virtusa Corp, Massachusetts
Winston George – VbiZap Soft Solutions (P) Ltd., Chennai
http://www.SofTReL.org 8 of 142
Software Testing Guide Book Part I: Fundamentals of Software Testing
Intended Audience
This guide book is aimed at all Testing Professionals – from a beginner to an advanced
user. This book would provide a baseline understanding of the conceptual theory.
How to Contribute
This is an open source project. If you are interested in contributing to the book or to the
Lab, please do write in to stgb at SoFTReL dot org. We need your expertise in the
research activities.
Future Enhancements
This is the first part of the three-part Software Testing Guide Book (STGB) series. You
can visit http://www.softrel.org/stgb.html for updates on the Project.
Copyrights
SofTReL is not proposing the Testing methodologies, types and various other concepts.
We tried presenting each and every theoretical concept of Software Testing with a live
example for easier understanding of the subject and arriving at a common
understanding of Software Test Engineering.
However, we did put in few of our proposed ways to achieve specific tasks and these are
governed by The GNU Free Documentation License (GNU-FDL). Please visit
http://www.gnu.org/doc/doc.html for complete guidelines of the license or alternatively
you can find the license towards the end of this document
http://www.SofTReL.org 9 of 142
Software Testing Guide Book Part I: Fundamentals of Software Testing
This crisis though identified in the early years, exists to date and we have examples of
software failures around the world. Software is basically considered a failure if the
project is terminated because of costs or overrun schedules, if the project has
experienced overruns in excess of 50% of the original or if the software results in client
lawsuits. Some examples of failures include failure of Air traffic control systems, failure
of medical software, and failure in telecommunication software. The primary reason for
these failures other than those mentioned above is due to bad software engineering
practices adopted. Some of the worst software practices include:
No historical software-measurement data.
Rejection of accurate cost estimates.
Failure to use automated estimating and planning tools.
Excessive, irrational schedule pressure and creep in user requirements.
Failure to monitor progress and to perform risk management.
Failure to use design reviews and code inspections.
To avoid these failures and thus improve the record, what is needed is a better
understanding of the process, better estimation techniques for cost time and quality
measures. But the question is, what is a process? Process transform inputs to outputs
http://www.SofTReL.org 10 of 142
Software Testing Guide Book Part I: Fundamentals of Software Testing
i.e. a product. A software process is a set of activities, methods and practices involving
transformation that people use to develop and maintain software.
At present a large number of problems exist due to a chaotic software process and the
occasional success depends on individual efforts. Therefore to be able to deliver
successful software projects, a focus on the process is essential since a focus on the
product alone is likely to miss the scalability issues, and improvements in the existing
system. This focus would help in the predictability of outcomes, project trends, and
project characteristics.
The process that has been defined and adopted needs to be managed well and thus
process management comes into play. Process management is concerned with the
knowledge and management of the software process, its technical aspects and also
ensures that the processes are being followed as expected and improvements are
shown.
From this we conclude that a set of defined processes can possibly save us from
software project failures. But it is nonetheless important to note that the process alone
cannot help us avoid all the problems, because with varying circumstances the need
varies and the process has to be adaptive to these varying needs. Importance needs to
be given to the human aspect of software development since that alone can have a lot of
impact on the results, and effective cost and time estimations may go totally waste if the
human resources are not planned and managed effectively. Secondly, the reasons
mentioned related to the software engineering principles may be resolved when the
needs are correctly identified. Correct identification would then make it easier to
identify the best practices that can be applied because one process that might be
suitable for one organization may not be most suitable for another.
Therefore to make a successful product a combination of Process and Technicalities will
be required under the umbrella of a well-defined process.
Having talked about the Software process overall, it is important to identify and relate
the role software testing plays not only in producing quality software but also
maneuvering the overall process.
The computer society defines testing as follows: “Testing -- A verification method that
applies a controlled set of conditions and stimuli for the purpose of finding errors. This
is the most desirable method of verifying the functional and performance requirements.
Test results are documented proof that requirements were met and can be repeated.
The resulting data can be reviewed by all concerned for confirmation of capabilities.”
http://www.SofTReL.org 11 of 142
Software Testing Guide Book Part I: Fundamentals of Software Testing
There may be many definitions of software testing and many which appeal to us from
time to time, but its best to start by defining testing and then move on depending on
the requirements or needs.
http://www.SofTReL.org 12 of 142
Software Testing Guide Book Part I: Fundamentals of Software Testing
system and instructs the system which sent the data to perform specific tasks based on
the reply sent by the system which received the data.
http://www.SofTReL.org 14 of 142
Software Testing Guide Book Part I: Fundamentals of Software Testing
"The process of designing a model of a real system and conducting experiments with
this model for the purpose of understanding the behavior of the system and/or
evaluating various strategies for the operation of the system"-- Introduction to
Simulation Using SIMAN, by C. D. Pegden, R. E. Shannon and R. P. Sadowski, McGraw-
Hill, 1990.
http://www.SofTReL.org 15 of 142
Software Testing Guide Book Part I: Fundamentals of Software Testing
The simulation system may use only software or a combination of software and
hardware to model the real system. The simulation software often involves the
integration of artificial intelligence and other modeling techniques.
What applications fall under this category?
Simulation is widely used in many fields. Some of the applications are:
• Models of planes and cars that are tested in wind tunnels to determine the
aerodynamic properties.
• Used in computer Games (E.g. SimCity, car games etc). This simulates the
working in a city, the roads, people talking, playing games etc.
• War tactics that are simulated using simulated battlefields.
• Most Embedded Systems are developed by simulation software before they ever
make it to the chip fabrication labs.
• Stochastic simulation models are often used to model applications such as
weather forecasting systems.
• Social simulation is used to model socio-economic situations.
• It is extensively used in the field of operations research.
http://www.SofTReL.org 16 of 142
Software Testing Guide Book Part I: Fundamentals of Software Testing
A dynamic simulation system has a model that accommodates for changes in data over
time. This means that the input data affecting the results will be entered into the
simulation during its entire lifetime than just at the beginning. A simulation system
used to predict the growth of the economy may need to incorporate changes in
economic data, is a good example of a dynamic simulation system.
http://www.SofTReL.org 17 of 142
Software Testing Guide Book Part I: Fundamentals of Software Testing
Subjective Testing
Subjective testing mainly depends on an expert's opinion. An expert is a person who is
proficient and experienced in the system under test. Conducting the test involves test
runs of the simulation by the expert and then the expert evaluates and validates the
results based on some criteria.
One advantage of this approach over objective testing is that it can test those conditions
which cannot be tested objectively. For example, an expert can determine whether the
joystick handling of the flight feels "right".
One disadvantage is that the evaluation of the system is based on the "expert's" opinion,
which may differ from expert to expert. Also, if the system is very large then it is bound
to have many experts. Each expert may view it differently and can give conflicting
opinions. This makes it difficult to determine the validity of the system. Despite all
these disadvantages, subjective testing is necessary for testing systems with human
interaction.
Objective Testing
Objective testing is mainly used in systems where the data can be recorded while the
simulation is running. This testing technique relies on the application of statistical and
automated methods to the data collected.
Statistical methods are used to provide an insight into the accuracy of the simulation.
These methods include hypothesis testing, data plots, principle component analysis and
cluster analysis.
Automated testing requires a knowledge base of valid outcomes for various runs of
simulation. This knowledge base is created by domain experts of the simulation system
being tested. The data collected in various test runs is compared against this knowledge
base to automatically validate the system under test. An advantage of this kind of
testing is that the system can continually be regression tested as it is being developed.
Statistical Methods
Statistical methods are used to provide an insight into the accuracy of the simulation.
These methods include hypothesis testing, data plots, principle component analysis and
cluster analysis.
Automated Testing
Automated testing requires a knowledge base of valid outcomes for various runs of
simulation. This knowledge base is created by domain experts of the simulation system
being tested. The data collected in various test runs is compared against this knowledge
base to automatically validate the system under test. An advantage of this kind of
testing is that the system can continually be regression tested as it is being developed.
http://www.SofTReL.org 18 of 142
Software Testing Guide Book Part I: Fundamentals of Software Testing
http://www.SofTReL.org 19 of 142
Software Testing Guide Book Part I: Fundamentals of Software Testing
Visibility
Visibility is our ability to observe the states and outputs of the software under test.
Features to improve the visibility are
• Access to Code
Developers must provide full access (source code, infrastructure, etc) to testers.
The Code, change records and design documents should be provided to the
testing team. The testing team should read and understand the code.
• Event logging
The events to log include User events, System milestones, Error handling and
completed transactions. The logs may be stored in files, ring buffers in memory,
and/or serial ports. Things to be logged include description of event, timestamp,
subsystem, resource usage and severity of event. Logging should be adjusted by
subsystem and type. Log file report internal errors, help in isolating defects, and
give useful information about context, tests, customer usage and test coverage.
The more readable the Log Reports are, the easier it becomes to identify the
defect cause and work towards corrective measures.
http://www.SofTReL.org 20 of 142
Software Testing Guide Book Part I: Fundamentals of Software Testing
• Resource Monitoring
Memory usage should be monitored to find memory leaks. States of running
methods, threads or processes should be watched (Profiling interfaces may be
used for this.). In addition, the configuration values should be dumped.
Resource monitoring is of particular concern in applications where the load on
the application in real time is estimated to be considerable.
Control
Control refers to our ability to provide inputs and reach states in the software under
test.
The features to improve controllability are:
• Test Points
Allow data to be inspected, inserted or modified at points in the software. It is
especially useful for dataflow applications. In addition, a pipe and filters
architecture provides many opportunities for test points.
• Custom User Interface controls
Custom UI controls often raise serious testability problems with GUI test drivers.
Ensuring testability usually requires:
Adding methods to report necessary information
Customizing test tools to make use of these methods
Getting a tool expert to advise developers on testability and to
build the required support.
http://www.SofTReL.org 21 of 142
Software Testing Guide Book Part I: Fundamentals of Software Testing
• Test Interfaces
Interfaces may be provided specifically for testing e.g. Excel and Xconq etc.
Existing interfaces may be able to support significant testing e.g. InstallSheild,
AutoCAD, Tivoli, etc.
• Fault injection
Error seeding---instrumenting low level I/O code to simulate errors---makes it
much easier to test error handling. It can be handled at both system and
application level, Tivoli, etc.
• Installation and setup
Testers should be notified when installation has completed successfully. They
should be able to verify installation, programmatically create sample records
and run multiple clients, daemons or servers on a single machine.
A BROADER VIEW
Below are given a broader set of characteristics (usually known as James Bach
heuristics) that lead to testable software.
http://www.SofTReL.org 23 of 142
Software Testing Guide Book Part I: Fundamentals of Software Testing
Requirements Analysis
http://www.SofTReL.org 24 of 142
Software Testing Guide Book Part I: Fundamentals of Software Testing
• Invest in analysis at the beginning of the project - Having a clear, concise and
formal statement of the requirements facilitates programming,
communication, error analysis an d test data generation.
Deciding the above issues is one of the activities related to testing that
should be performed during this stage.
• Start developing the test set at the requirements analysis phase - Data should
be generated that can be used to determine whether the requirements have
been met. To do this, the input domain should be partitioned into classes of
values that the program will treat in a similar manner and for each class a
representative element should be included in the test data. In addition,
following should also be included in the data set: (1) boundary values (2) any
non-extreme input values that would require special handling.
The output domain should be treated similarly.
Invalid input requires the same analysis as valid input.
Design
The design document aids in programming, communication, and error analysis and test
data generation. The requirements statement and the design document should together
http://www.SofTReL.org 25 of 142
Software Testing Guide Book Part I: Fundamentals of Software Testing
give the problem and the organization of the solution i.e. what the program will do and
how it will be done.
• Analysis of design to check its completeness and consistency - the total process
should be analyzed to determine that no steps or special cases have been
overlooked. Internal interfaces, I/O handling and data structures should
specially be checked for inconsistencies.
• Generation of test data based on the design - The tests generated should cover
the structure as well as the internal functions of the design like the data
structures, algorithm, functions, heuristics and general program structure etc.
Standard extreme and special values should be included and expected output
should be recorded in the test data.
• Reexamination and refinement of the test data set generated at the requirements
analysis phase.
The first two steps should also be performed by some colleague and not only the
designer/developer.
Programming/Construction
http://www.SofTReL.org 26 of 142
Software Testing Guide Book Part I: Fundamentals of Software Testing
• Check the code for consistency with design - the areas to check include modular
structure, module interfaces, data structures, functions, algorithms and I/O
handling.
• Perform the Testing process in an organized and systematic manner with test runs
dated, annotated and saved. A plan or schedule can be used as a checklist to
help the programmer organize testing efforts. If errors are found and changes
made to the program, all tests involving the erroneous segment (including those
which resulted in success previously) must be rerun and recorded.
• Asks some colleague for assistance - Some independent party, other than the
programmer of the specific part of the code, should analyze the development
product at each phase. The programmer should explain the product to the party
who will then question the logic and search for errors with a checklist to guide
the search. This is needed to locate errors the programmer has overlooked.
• Use available tools - the programmer should be familiar with various compilers
and interpreters available on the system for the implementation language being
used because they differ in their error analysis and code generation capabilities.
• Apply Stress to the Program - Testing should exercise and stress the program
structure, the data structures, the internal functions and the externally visible
functions or functionality. Both valid and invalid data should be included in the
test set.
• Test one at a time - Pieces of code, individual modules and small collections of
modules should be exercised separately before they are integrated into the total
program, one by one. Errors are easier to isolate when the no. of potential
interactions should be kept small. Instrumentation-insertion of some code into
the program solely to measure various program characteristics – can be useful
here. A tester should perform array bound checks, check loop control variables,
determine whether key data values are within permissible ranges, trace program
execution, and count the no. of times a group of statements is executed.
http://www.SofTReL.org 27 of 142
Software Testing Guide Book Part I: Fundamentals of Software Testing
• Measure testing coverage/When should testing stop? - If errors are still found
every time the program is executed, testing should continue. Because errors
tend to cluster, modules appearing particularly error-prone require special
scrutiny.
The metrics used to measure testing thoroughness include statement testing
(whether each statement in the program has been executed at least once),
branch testing (whether each exit from each branch has been executed at least
once) and path testing (whether all logical paths, which may involve repeated
execution of various segments, have been executed at least once). Statement
testing is the coverage metric most frequently used as it is relatively simple to
implement.
The amount of testing depends on the cost of an error. Critical programs or
functions require more thorough testing than the less significant functions.
Corrections, modifications and extensions are bound to occur even for small programs
and testing is required every time there is a change. Testing during maintenance is
termed regression testing. The test set, the test plan, and the test results for the original
program should exist. Modifications must be made to accommodate the program
changes, and then all portions of the program affected by the modifications must be re-
tested. After regression testing is complete, the program and test documentation must
be updated to reflect the changes.
http://www.SofTReL.org 28 of 142
Software Testing Guide Book Part I: Fundamentals of Software Testing
Software Requirement
Specification
Functional Specification
Document
Functional Specification
Architecture Design
Document
Coding
Functional Specification
Unit Test Case Documents
Document
Functional Specification
Document Performance Test Cases
and Scenarios
Performance Criteria
Software Requirement
Specification
http://www.SofTReL.org 29 of 142
Software Testing Guide Book Part I: Fundamentals of Software Testing
Practically, we feel that the decision of stopping testing is based on the level of the risk
acceptable to the management. As testing is a never ending process we can never
assume that 100 % testing has been done, we can only minimize the risk of shipping
the product to client with X testing done. The risk can be measured by Risk analysis
but for small duration / low budget / low resources project, risk can be deduced by
simply: -
9. Verification Strategies
What is ‘Verification’?
Verification is the process of evaluating a system or component to determine whether
the products of a given development phase satisfy the conditions imposed at the start of
that phase.1
9.1 Review
A process or meeting during which a work product, or set of work products, is
presented to project personnel, managers, users, customers, or other interested parties
for comment or approval.
http://www.SofTReL.org 30 of 142
Software Testing Guide Book Part I: Fundamentals of Software Testing
The main goal of reviews is to find defects. Reviews are a good compliment to testing to
help assure quality. A few purposes’ of SQA reviews can be as follows:
• Assure the quality of deliverable’s before the project moves to the next stage.
• Once a deliverable has been reviewed, revised as required, and approved, it can
be used as a basis for the next stage in the life cycle.
What are the various types of reviews?
Types of reviews include Management Reviews, Technical Reviews, Inspections,
Walkthroughs and Audits.
Management Reviews
Management reviews are performed by those directly responsible for the system in order
to monitor progress, determine status of plans and schedules, confirm requirements
and their system allocation.
Therefore the main objectives of Management Reviews can be categorized as follows:
• Validate from a management perspective that the project is making progress
according to the project plan.
• Ensure that deliverables are ready for management approvals.
• Resolve issues that require management’s attention.
• Identify any project bottlenecks.
• Keeping project in Control.
Support decisions made during such reviews include Corrective actions, Changes in the
allocation of resources or changes to the scope of the project
In management reviews the following Software products are reviewed:
Audit Reports
Contingency plans
Installation plans
Risk management plans
Software Q/A
The participants of the review play the roles of Decision-Maker, Review Leader,
Recorder, Management Staff, and Technical Staff.
Technical Reviews
http://www.SofTReL.org 31 of 142
Software Testing Guide Book Part I: Fundamentals of Software Testing
The participants of the review play the roles of Decision-maker, Review leader, Recorder,
Technical staff.
Input Criteria
Software requirement specification is the essential document for the review. A checklist
can be used for the review.
Exit Criteria
Exit criteria include the filled & completed checklist with the reviewers’ comments &
suggestions and the re-verification whether they are incorporated in the documents.
http://www.SofTReL.org 32 of 142
Software Testing Guide Book Part I: Fundamentals of Software Testing
comment or approval. Types include critical design review, preliminary design review,
and system design review.
Input Criteria
Design document is the essential document for the review. A checklist can be used for
the review.
Exit Criteria
Exit criteria include the filled & completed checklist with the reviewers’ comments &
suggestions and the re-verification whether they are incorporated in the documents.
Input Criteria
The Coding Standards Document and the Source file are the essential documents for
the review. A checklist can be used for the review.
Exit Criteria
Exit criteria include the filled & completed checklist with the reviewers’ comments &
suggestions and the re-verification whether they are incorporated in the documents.
9.2 Walkthrough
A static analysis technique in which a designer or programmer leads members of the
development team and other interested parties through a segment of documentation or
http://www.SofTReL.org 33 of 142
Software Testing Guide Book Part I: Fundamentals of Software Testing
code, and the participants ask questions and make comments about possible errors,
violation of development standards, and other problems.
The objectives of Walkthrough can be summarized as follows:
• Detect errors early.
• Ensure (re)established standards are followed:
• Train and exchange technical information among project teams which participate in
the walkthrough.
• Increase the quality of the project, thereby improving morale of the team members.
The participants in Walkthroughs assume one or more of the following roles:
a) Walk-through leader
b) Recorder
c) Author
d) Team member
To consider a review as a systematic walk-through, a team of at least two members
shall be assembled. Roles may be shared among the team members. The walk-through
leader or the author may serve as the recorder. The walk-through leader may be the
author.
Individuals holding management positions over any member of the walk-through team
shall not participate in the walk-through.
http://www.SofTReL.org 34 of 142
Software Testing Guide Book Part I: Fundamentals of Software Testing
9.3 Inspection
A static analysis technique that relies on visual examination of development products to
detect errors, violations of development standards, and other problems. Types include
code inspection; design inspection, Architectural inspections, Test ware inspections etc.
The participants in Inspections assume one or more of the following roles:
a) Inspection leader
b) Recorder
c) Reader
d) Author
e) Inspector
All participants in the review are inspectors. The author shall not act as inspection
leader and should not act as reader or recorder. Other roles may be shared among the
team members. Individual participants may act in more than one role.
Individuals holding management positions over any member of the inspection team
shall not participate in the inspection.
http://www.SofTReL.org 35 of 142
Software Testing Guide Book Part I: Fundamentals of Software Testing
a) Accept with no or minor rework. The software product is accepted as is or with only
minor rework. (For example, that would require no further verification).
b) Accept with rework verification. The software product is to be accepted after the
inspection leader or
a designated member of the inspection team (other than the author) verifies rework.
c) Re-inspect. Schedule a re-inspection to verify rework. At a minimum, a re-inspection
shall examine the software product areas changed to resolve anomalies identified in the
last inspection, as well as side effects of those changes.
Testing types refer to different approaches towards testing a computer program, system
or product. The two types of testing are black box testing and white box testing, which
would both be discussed in detail in this chapter. Another type, termed as gray
box testing or hybrid testing is evolving presently and it combines the features of the
two types.
Testing Techniques
Testing techniques refer to different methods of testing particular features a computer
program, system or product. Each testing type has its own testing techniques while
some techniques combine the feature of both types. Some techniques are
• Error and anomaly detection technique
• Interface checking
• Physical units checking
• Loop testing ( Discussed in detail in this chapter)
• Basis Path testing/McCabe’s cyclomatic number( Discussed in detail in this
chapter)
• Control structure testing( Discussed in detail in this chapter)
• Error Guessing( Discussed in detail in this chapter)
• Boundary Value analysis ( Discussed in detail in this chapter)
• Graph based testing( Discussed in detail in this chapter)
• Equivalence partitioning( Discussed in detail in this chapter)
• Instrumentation based testing
• Random testing
• Domain testing
http://www.SofTReL.org 36 of 142
Software Testing Guide Book Part I: Fundamentals of Software Testing
Some of these and many others would be discussed in the later sections of this chapter.
That is, testing types mean whether we are testing the function or the structure of the
software. In other words, we may test each function of the software to see if it is
operational or we may test the internal components of the software to check if its
internal workings are according to specification.
On the other hand, ‘Testing technique’ means what methods or ways would be applied
or calculations would be done to test a particular feature of a software (Sometimes we
test the interfaces, sometimes we test the segments, sometimes loops etc.)
White box testing is much more expensive (In terms of resources and time) than black
box testing. It requires the source code to be produced before the tests can be planned
and is much more laborious in the determination of suitable input data and the
determination if the software is or is not correct. It is advised to start test planning with
a black box testing approach as soon as the specification is available. White box tests
are to be planned as soon as the Low Level Design (LLD) is complete. The Low Level
Design will address all the algorithms and coding style. The paths should then be
http://www.SofTReL.org 37 of 142
Software Testing Guide Book Part I: Fundamentals of Software Testing
checked against the black box test plan and any additional required test cases should
be determined and applied.
White box testing involves looking at the structure of the code. When you know the
internal structure of a product, tests can be conducted to ensure that the internal
operations performed according to the specification. And all internal components have
been adequately exercised. In other word WBT tends to involve the coverage of the
specification in the code.
http://www.SofTReL.org 38 of 142
Software Testing Guide Book Part I: Fundamentals of Software Testing
What do we do in WBT?
In WBT, we use the control structure of the procedural design to derive test cases.
Using WBT methods a tester can derive the test cases that
• Guarantee that all independent paths within a module have been exercised
at least once.
• Exercise all logical decisions on their true and false values.
• Execute all loops at their boundaries and within their operational bounds
• Exercise internal data structures to ensure their validity.
White box testing (WBT) is also called Structural or Glass box testing.
Why WBT?
http://www.SofTReL.org 39 of 142
Software Testing Guide Book Part I: Fundamentals of Software Testing
http://www.SofTReL.org 40 of 142
Software Testing Guide Book Part I: Fundamentals of Software Testing
Skills Required
Talking theoretically, all we need to do in WBT is to define all logical paths, develop
test cases to exercise them and evaluate results i.e. generate test cases to exercise
the program logic exhaustively.
For this we need to know the program well i.e. We should know the specification
and the code to be tested; related documents should be available too us .We must
be able to tell the expected status of the program versus the actual status found at
any point during the testing process.
Limitations
http://www.SofTReL.org 41 of 142
Software Testing Guide Book Part I: Fundamentals of Software Testing
Basis path testing is a white box testing technique first proposed by Tom McCabe. The
Basis path method enables to derive a logical complexity measure of a procedural
design and use this measure as a guide for defining a basis set of execution paths. Test
Cases derived to exercise the basis set are guaranteed to execute every statement in the
program at least one time during testing.
The flow graph depicts logical control flow using a diagrammatic notation. Each
structured construct has a corresponding flow graph symbol.
The procedure for deriving the flow graph and even determining a set of basis paths is
amenable to mechanization. To develop a software tool that assists in basis path
testing, a data structure, called a graph matrix can be quite useful.
http://www.SofTReL.org 42 of 142
Software Testing Guide Book Part I: Fundamentals of Software Testing
A Graph Matrix is a square matrix whose size is equal to the number of nodes on the
flow graph. Each row and column corresponds to an identified node, and matrix entries
correspond to connections between nodes.
Loop Testing is a white box testing technique that focuses exclusively on the validity of
loop constructs. Four classes of loops can be defined: Simple loops, Concatenated
loops, nested loops, and unstructured loops.
Simple Loops
The following sets of tests can be applied to simple loops, where ‘n’ is the maximum
number of allowable passes through the loop.
1. Skip the loop entirely.
2. Only one pass through the loop.
3. Two passes through the loop.
4. ‘m’ passes through the loop where m<n.
5. n-1, n, n+1 passes through the loop.
Nested Loops
If we extend the test approach from simple loops to nested loops, the number of
possible tests would grow geometrically as the level of nesting increases.
1. Start at the innermost loop. Set all other loops to minimum values.
2. Conduct simple loop tests for the innermost loop while holding the outer
loops at their minimum iteration parameter values. Add other tests for out-of-
range or exclude values.
3. Work outward, conducting tests for the next loop, but keep all other outer loops
at minimum values and other nested loops to “typical” values.
4. Continue until all loops have been tested.
http://www.SofTReL.org 43 of 142
Software Testing Guide Book Part I: Fundamentals of Software Testing
Concatenated Loops
Concatenated loops can be tested using the approach defined for simple loops, if
each of the loops is independent of the other. However, if two loops are concatenated
and the loop counter for loop 1 is used as the initial value for loop 2, then the loops
are not independent.
Unstructured Loops
Whenever possible, this class of loops should be redesigned to reflect the use of the
structured programming constructs.
Some people like to call black box testing as behavioral, functional, opaque-box, and
closed-box. While the term black box is most popularly use, many people prefer the
terms "behavioral" and "structural" for black box and white box respectively. Behavioral
test design is slightly different from black-box test design because the use of internal
knowledge isn't strictly forbidden, but it's still discouraged.
Personally we feel that there is a trade off between the approaches used to test a
product using white box and black box types.
There are some bugs that cannot be found using only black box or only white box. If the
test cases are extensive and the test inputs are also from a large sample space then it is
always possible to find majority of the bugs through black box testing.
Tools used for Black Box testing:
Many tool vendors have been producing tools for automated black box and automated
white box testing for several years. The basic functional or regression testing tools
capture the results of black box tests in a script format. Once captured, these scripts
can be executed against future builds of an application to verify that new functionality
hasn't disabled previous functionality.
Advantages of Black Box Testing
- Tester can be non-technical.
- This testing is most likely to find those bugs as the user would find.
http://www.SofTReL.org 44 of 142
Software Testing Guide Book Part I: Fundamentals of Software Testing
Software testing begins by creating a graph of important objects and their relationships
and then devising a series of tests that will cover the graph so that each objects and
their relationships and then devising a series of tests that will cover the graph so that
each object and relationship is exercised and error is uncovered.
Error Guessing comes with experience with the technology and the project. Error
Guessing is the art of guessing where errors can be hidden. There are no specific tools
and techniques for this, but you can write test cases depending on the situation: Either
when reading the functional documents or when you are testing and find an error that
you have not documented.
BVA focuses on the boundary of the input space to identify test cases
Rational is that errors tend to occur near the extreme values of an input
variable
http://www.SofTReL.org 45 of 142
Software Testing Guide Book Part I: Fundamentals of Software Testing
Equivalence partitioning is a black box testing method that divides the input domain of
a program into classes of data from which test cases can be derived.
http://www.SofTReL.org 46 of 142
Software Testing Guide Book Part I: Fundamentals of Software Testing
There are situations where independent versions of software be developed for critical
applications, even when only a single version will be used in the delivered computer
based system. It is these independent versions which form the basis of a black box
testing technique called Comparison testing or back-to-back testing.
The Orthogonal Array Testing Strategy (OATS) is a systematic, statistical way of testing
pair-wise interactions by deriving a suitable small set of test cases (from a large number
of possibilities).
http://www.SofTReL.org 47 of 142
Software Testing Guide Book Part I: Fundamentals of Software Testing
3. For each Requirement, decide what technique you should use to derive the test
cases. For example, if you are testing a Login page, you need to write test cases
basing on error guessing and also negative cases for handling failures.
4. Have a Traceability Matrix as follows:
Requirement No (In RD) Requirement Test Case No
What this Traceability Matrix provides you is the coverage of Testing. Keep filling
in the Traceability matrix when you complete writing test case’s for each
requirement.
http://www.SofTReL.org 48 of 142
Software Testing Guide Book Part I: Fundamentals of Software Testing
Due to such interfaces, independent testing of a Unit becomes impossible. But that is
what we want to do; we want to test a Unit in isolation! So here we use ‘Stub’ and
‘Driver.
A ‘Driver’ is a piece of software that drives (invokes) the Unit being tested. A driver
creates necessary ‘Inputs’ required for the Unit and then invokes the Unit.
A Unit may reference another Unit in its logic. A ‘Stub’ takes place of such subordinate
unit during the Unit Testing. A ‘Stub’ is a piece of software that works similar to a unit
which is referenced by the Unit being tested, but it is much simpler that the actual
unit. A Stub works as a ‘Stand-in’ for the subordinate unit and provides the minimum
required behavior for that unit.
Programmer needs to create such ‘Drivers’ and ‘Stubs’ for carrying out Unit Testing.
Both the Driver and the Stub are kept at a minimum level of complexity, so that they do
not induce any errors while testing the Unit in question.
Example - For Unit Testing of ‘Sales Order Printing’ program, a ‘Driver’ program will
have the code which will create Sales Order records using hardcoded data and then call
‘Sales Order Printing’ program. Suppose this printing program uses another unit which
calculates Sales discounts by some complex calculations. Then call to this unit will be
replaced by a ‘Stub’, which will simply return fix discount data.
http://www.SofTReL.org 49 of 142
Software Testing Guide Book Part I: Fundamentals of Software Testing
o Every input value: Write test cases for each of the inputs accepted by the
Unit.
e.g. If a Data Entry Form has 10 fields on it, write test cases for all 10 fields.
o Validation of input: Every input has certain validation rule associated with
it. Write test cases to validate this rule. Also, there can be cross-field
validations in which one field is enabled depending upon input of another
field. Test cases for these should not be missed.
e.g. A combo box or list box has a valid set of values associated with it.
A numeric field may accept only positive values.
An email address field must have ampersand (@) and period (.) in it.
A ‘Sales tax code’ entered by user must belong to the ‘State’ specified by
the user.
o Boundary conditions: Inputs often have minimum and maximum possible
values. Do not forget to write test cases for them.
e.g. A field that accepts ‘percentage’ on a Data Entry Form should be able to
accept inputs only from 1 to 100.
o Limitations of data types: Variables that hold the data have their value limits
depending upon their data types. In case of computed fields, it is very
important to write cases to arrive at an upper limit value of the variables.
o Computations: If any calculations are involved in the processing, write test
cases to check the arithmetic expressions with all possible combinations of
values.
Output values: Write test cases to generate scenarios, which will produce all types
of output values that are expected from the Unit.
e.g. A Report can display one set of data if user chooses a particular option and
another set of data if user chooses a different option. Write test cases to check each
of these outputs. When the output is a result of some calculations being performed
or some formulae being used, then approximations play a major role and must be
checked.
Screen / Report Layout: Screen Layout or web page layout and Report layout must
be tested against the requirements. It should not happen that the screen or the
report looks beautiful and perfect, but user wanted something entirely different! It
should ensure that pages and screens are consistent.
Path coverage: A Unit may have conditional processing which results in various
paths the control can traverse through. Test case must be written for each of these
paths.
http://www.SofTReL.org 50 of 142
Software Testing Guide Book Part I: Fundamentals of Software Testing
Assumptions: A Unit may assume certain things for it to function. For example, a
Unit may need a database to be open. Then test case must be written to check that
the Unit reports error if such assumptions are not met.
Transactions: In case of database applications, it is important to make sure that
transactions are properly designed and no way inconsistent data gets saved in the
database.
Abnormal terminations: Behavior of the Unit in case of abnormal termination
should be tested.
Error messages: Error messages should be short, precise and self-explanatory. They
should be properly phrased and should be free of grammatical mistakes.
UTC Document
Given below is a simple format for UTC document.
Note that as this is a sample, we have not provided columns for Pass/Fail and Remarks.
Example:
Let us say we want to write UTC for a Data Entry Form below:
Given below are some of the Unit Test Cases for the above Form:
Test Test Case Procedure Expected Result Actual
Case purpose result
No.
http://www.SofTReL.org 51 of 142
Software Testing Guide Book Part I: Fundamentals of Software Testing
UTC Checklist
UTC checklist may be used while reviewing the UTC prepared by the programmer. As
any other checklist, it contains a list of questions, which can be answered as either a
‘Yes’ or a ‘No’. The ‘Aspects’ list given in Section 4.3 above can be referred to while
preparing UTC checklist.
e.g. Given below are some of the checkpoints in UTC checklist –
1. Are test cases present for all form field validations?
2. Are boundary conditions considered?
3. Are Error messages properly phrased?
Defect Recording
Defect Recording can be done on the same document of UTC, in the column of
‘Expected Results’. This column can be duplicated for the next iterations of Unit
Testing.
Defect Recording can also be done using some tools like Bugzilla, in which defects are
stored in the database.
Defect Recording needs to be done with care. It should be able to indicate the problem
in clear, unambiguous manner, and reproducing of the defects should be easily possible
from the defect information.
Conclusion
http://www.SofTReL.org 52 of 142
Software Testing Guide Book Part I: Fundamentals of Software Testing
Exhaustive Unit Testing filters out the defects at an early stage in the Development Life
Cycle. It proves to be cost effective and improves Quality of the Software before the
smaller pieces are put together to form an application as a whole. Unit Testing should
be done sincerely and meticulously, the efforts are paid well in the long run.
Bottom-up integration testing begins construction and testing with atomic modules (i.e.
components at the lowest levels in the program structure). Because components are
integrated from the bottom up, processing required for components subordinate to a
given level is always available and the need for stubs is eliminated.
1. A Bottom-up integration strategy may be implemented with the following steps:
http://www.SofTReL.org 53 of 142
Software Testing Guide Book Part I: Fundamentals of Software Testing
2. Low level components are combined into clusters that perform a specific
software sub function.
3. A driver is written to coordinate test case input and output.
4. The cluster is tested.
Drivers are removed and clusters are combined moving upward in the program
structure.
Compatibility Testing concentrates on testing whether the given application goes well
with third party tools, software or hardware platform.
For example, you have developed a web application. The major compatibility issue is,
the web site should work well in various browsers. Similarly when you develop
applications on one platform, you need to check if the application works on other
operating systems as well. This is the main goal of Compatibility Testing.
Before you begin compatibility tests, our sincere suggestion is that you should have a
cross reference matrix between various software’s, hardware based on the application
requirements. For example, let us suppose you are testing a web application. A sample
list can be as follows:
Hardware Software Operating System
Pentium – II, 128 MB RAM IE 4.x, Opera, Netscape Windows 95
Pentium – III, 256 MB RAM IE 5.x, Netscape Windows XP
Pentium – IV, 512 MB RAM Mozilla Linux
Compatibility tests are also performed for various client/server based applications
where the hardware changes from client to client.
Compatibility Testing is very crucial to organizations developing their own products.
The products have to be checked for compliance with the competitors of the third party
tools, hardware, or software platform. E.g. A Call center product has been built for a
solution with X product but there is a client interested in using it with Y product; then
the issue of compatibility arises. It is of importance that the product is compatible with
varying platforms. Within the same platform, the organization has to be watchful that
with each new release the product has to be tested for compatibility.
A good way to keep up with this would be to have a few resources assigned along with
their routine tasks to keep updated about such compatibility issues and plan for testing
when and if the need arises.
http://www.SofTReL.org 54 of 142
Software Testing Guide Book Part I: Fundamentals of Software Testing
By the above example it is not intended that companies which are not developing
products do not have to cater for this type of testing. There case is equally existent, if an
application uses standard software then would it be able to run successfully with the
newer versions too? Or if a website is running on IE or Netscape, what will happen
when it is opened through Opera or Mozilla. Here again it is best to keep these issues in
mind and plan for compatibility testing in parallel to avoid any catastrophic failures and
delays.
Recovery testing is a system test that focuses the software to fall in a variety of ways
and verifies that recovery is properly performed. If it is automatic recovery then re-
initialization, check pointing mechanisms, data recovery and restart should be
evaluated for correctness. If recovery requires human intervention, the mean-time-to-
repair (MTTR) is evaluated to determine whether it is within acceptable limits.
Usability is the degree to which a user can easily learn and use a product to achieve a
goal. Usability testing is the system testing which attempts to find any human-factor
problems. A simpler description is testing the software from a users’ point of view.
Essentially it means testing software to prove/ensure that it is user-friendly, as distinct
from testing the functionality of the software. In practical terms it includes ergonomic
considerations, screen design, standardization etc.
The idea behind usability testing is to have actual users perform the tasks for which the
product was designed. If they can't do the tasks or if they have difficulty performing the
tasks, the UI is not adequate and should be redesigned. It should be remembered that
usability testing is just one of the many techniques that serve as a basis for evaluating
the UI in a user-centered approach. Other techniques for evaluating a UI include
inspection methods such as heuristic evaluations, expert reviews, card-sorting,
matching test or Icon intuitiveness evaluation, cognitive walkthroughs. Confusion
regarding usage of the term can be avoided if we use ‘usability evaluation’ for the
generic term and reserve ‘usability testing’ for the specific evaluation method based on
user performance. Heuristic Evaluation and Usability Inspection or cognitive
walkthrough does not involve real users.
It often involves building prototypes of parts of the user interface, having representative
users perform representative tasks and seeing if the appropriate users can perform the
tasks. In other techniques such as the inspection methods, it is not performance, but
http://www.SofTReL.org 55 of 142
Software Testing Guide Book Part I: Fundamentals of Software Testing
someone's opinion of how users might perform that is offered as evidence that the UI is
acceptable or not. This distinction between performance and opinion about performance
is crucial. Opinions are subjective. Whether a sample of users can accomplish what
they want or not is objective. Under many circumstances it is more useful to find out if
users can do what they want to do rather than asking someone.
1. Get a person who fits the user profile. Make sure that you are not getting
someone who has worked on it.
2. Sit them down in front of a computer, give them the application, and tell them a
small scenario, like: “Thank you for volunteering making it easier for users to
find what they are looking for. We would like you to answer several questions.
There is no right or wrong answers. What we want to learn is why you make the
choices you do, what is confusing, why choose one thing and not another, etc.
Just talk us through your search and let us know what you are thinking. We
have a recorder which is going to capture what you say, so you will have to tell
us what you are clicking on as you also tell us what you are thinking. Also think
aloud when you are stuck somewhere”
3. Now don’t speak anything. Sounds easy, but see if you actually can shut up.
4. Watch them use the application. If they ask you something, tell them you're not
there. Then shut up again.
5. Start noting all the things you will have to change.
6. Afterwards ask them what they thought and note them down.
7. Once the whole thing is done thank the volunteer.
• DRUM from Serco Usability Services is a tool, which has been developed by
close cooperation between Human Factors professionals and software engineers
to provide a broad range of support for video-assisted observational studies.
USABILITY LABS
• Lodestone Research has usability-testing laboratory with state of the art audio
and visual recording and testing equipment. All equipment has been designed to
be portable so that it can be taken on the road. The lab consists of a test room
and an observation/control room that can seat as many as ten observers. A-V
equipment includes two (soon to be 3) fully controllable SVHS cameras,
capture/feed capabilities for test participant's PC via scan converter and direct
split signal (to VGA "slave" monitors in observation room), up to eight video
monitors and four VCA monitors for observer viewing, mixing/editing
http://www.SofTReL.org 57 of 142
Software Testing Guide Book Part I: Fundamentals of Software Testing
• Online Computer Library Center, Inc provides insight into the usability test
laboratory. It gives an overview of the infrastructure as well as the process being
used in the laboratory.
END GOALS OF USABILITY TESTING
To summarize the goals, it can be said that it makes the software more user friendly.
The end result will be:
• Better quality software.
• Software is easier to use.
• Software is more readily accepted by users.
• Shortens the learning curve for new users.
Security testing attempts to verify that protection mechanisms built into a system will,
in fact, protect it from improper penetration. During Security testing, password
cracking, unauthorized entry into the software, network security are all taken into
consideration.
Performance testing of a Web site is basically the process of understanding how the
Web application and its operating environment respond at various user load levels. In
http://www.SofTReL.org 58 of 142
Software Testing Guide Book Part I: Fundamentals of Software Testing
general, we want to measure the Response Time, Throughput, and Utilization of the
Web site while simulating attempts by virtual users to simultaneously access the site.
One of the main objectives of performance testing is to maintain a Web site with low
response time, high throughput, and low utilization.
Response Time
Response Time is the delay experienced when a request is made to the server and the
server's response to the client is received. It is usually measured in units of time, such
as seconds or milliseconds. Generally speaking, Response Time increases as the inverse
of unutilized capacity. It increases slowly at low levels of user load, but increases
rapidly as capacity is utilized. Figure 1 demonstrates such typical characteristics of
Response Time versus user load.
The sudden increase in response time is often caused by the maximum utilization of
one or more system resources. For example, most Web servers can be configured to
start up a fixed number of threads to handle concurrent user requests. If the number of
concurrent requests is greater than the number of threads available, any incoming
requests will be placed in a queue and will wait for their turn to be processed. Any time
spent in a queue naturally adds extra wait time to the overall Response Time.
To better understand what Response Time means in a typical Web farm, we can divide
response time into many segments and categorize these segments into two major types:
network response time and application response time. Network response time refers to
the time it takes for data to travel from one server to another. Application response time
is the time required for data to be processed within a server. Figure 2 shows the
different response time in the entire process of a typical Web request.
http://www.SofTReL.org 59 of 142
Software Testing Guide Book Part I: Fundamentals of Software Testing
Figure 2 shows the different response time in the entire process of a typical Web
request.
• You can optimize many server components to improve performance for your
configuration. Database tuning is one of the most important areas on which to
focus. Optimize stored procedures and indexes.
• Look for contention among threads or components competing for common
resources. There are several methods you can use to identify contention
bottlenecks. Depending on the specific problem, eliminating a resource contention
bottleneck may involve restructuring your code, applying service packs, or
upgrading components on your server. Not all resource contention problems can be
completely eliminated, but you should strive to reduce them wherever possible.
They can become bottlenecks for the entire system.
• Finally, to increase capacity, you may want to upgrade the server hardware (scaling
up), if system resources such as CPU or memory are stretched out and have become
the bottleneck. Using multiple servers as a cluster (scaling out) may help to lessen
the load on an individual server, thus improving system performance and reducing
application latencies.
Throughput
Throughput refers to the number of client requests processed within a certain unit of
time. Typically, the unit of measurement is requests per second or pages per second.
From a marketing perspective, throughput may also be measured in terms of visitors
per day or page views per day, although smaller time units are more useful for
performance testing because applications typically see peak loads of several times the
average load in a day.
As one of the most useful metrics, the throughput of a Web site is often measured and
analyzed at different stages of the design, develop, and deploy cycle. For example, in the
process of capacity planning, throughput is one of the key parameters for determining
the hardware and system requirements of a Web site. Throughput also plays an
important role in identifying performance bottlenecks and improving application and
system performance. Whether a Web farm uses a single server or multiple servers,
throughput statistics show similar characteristics in reactions to various user load
levels. Figure 3 demonstrates such typical characteristics of throughput versus user
load.
http://www.SofTReL.org 61 of 142
Software Testing Guide Book Part I: Fundamentals of Software Testing
In many ways, throughput and Response time are related, as different approaches to
thinking about the same problem. In general, sites with high latency will have low
throughput. If you want to improve your throughput, you should analyze the same
criteria as you would to reduce latency. Also, measurement of throughput without
consideration of latency is misleading because latency often rises under load before
throughput peaks. This means that peak throughput may occur at a latency that is
unacceptable from an application usability standpoint. This suggests that Performance
reports include a cut-off value for Response time, such as:250 requests/second @ 5
seconds maximum Response time
http://www.SofTReL.org 62 of 142
Software Testing Guide Book Part I: Fundamentals of Software Testing
Utilization
Utilization refers to the usage level of different system resources, such as the server's
CPU(s), memory, network bandwidth, and so forth. It is usually measured as a
percentage of the maximum available level of the specific resource. Utilization versus
user load for a Web server typically produces a curve, as shown in Figure 4.
http://www.SofTReL.org 63 of 142
Software Testing Guide Book Part I: Fundamentals of Software Testing
As Figure 5 demonstrates, monitoring the CPU or memory utilization alone may not
always indicate the true capacity level of the server farm with acceptable performance.
Applications
While most traditional applications are designed to respond to a single user at any time,
most Web applications are expected to support a wide range of concurrent users, from a
dozen to a couple thousand or more. As a result, performance testing has become a
critical component in the process of deploying a Web application. It has proven to be
most useful in (but not limited to) the following areas:
• Capacity planning
• Bug fixing
Capacity Planning
How do you know if your server configuration is sufficient to support two million
visitors per day with average response time of less than five seconds? If your company
is projecting a business growth of 200 percent over the next two months, how do you
know if you need to upgrade your server or add more servers to the Web farm? Can
your server and application support a six-fold traffic increase during the Christmas
shopping season?
Capacity planning is about being prepared. You need to set the hardware and software
requirements of your application so that you'll have sufficient capacity to meet
anticipated and unanticipated user load.
One approach in capacity planning is to load-test your application in a testing (staging)
server farm. By simulating different load levels on the farm using a Web application
performance testing tool such as WAS, you can collect and analyze the test results to
better understand the performance characteristics of the application. Performance
charts such as those shown in Figures 1, 3, and 4 can then be generated to show the
expected Response Time, throughput, and utilization at these load levels.
http://www.SofTReL.org 64 of 142
Software Testing Guide Book Part I: Fundamentals of Software Testing
In addition, you may also want to test the scalability of your application with different
hardware configurations. For example, load testing your application on servers with
one, two, and four CPUs respectively would help to determine how well the application
scales with symmetric multiprocessor (SMP) servers. Likewise, you should load test
your application with different numbers of clustered servers to confirm that your
application scales well in a cluster environment.
Although performance testing is as important as functional testing, it’s often overlooked
.Since the requirements to ensure the performance of the system is not as
straightforward as the functionalities of the system, achieving it correctly is more
difficult.
The effort of performance testing is addressed in two ways:
• Load testing
• Stress testing
Load testing
Load testing is a much used industry term for the effort of performance testing. Here
load means the number of users or the traffic for the system. Load testing is defined as
the testing to determine whether the system is capable of handling anticipated number
of users or not.
In Load Testing, the virtual users are simulated to exhibit the real user behavior as
much as possible. Even the user think time such as how users will take time to think
before inputting data will also be emulated. It is carried out to justify whether the
system is performing well for the specified limit of load.
The objective of load testing is to check whether the system can perform well for
specified load. The system may be capable of accommodating more than 1000
concurrent users. But, validating that is not under the scope of load testing. No attempt
is made to determine how many more concurrent users the system is capable of
servicing. Table 1 illustrates the example specified.
http://www.SofTReL.org 65 of 142
Software Testing Guide Book Part I: Fundamentals of Software Testing
Stress testing
Stress testing is another industry term of performance testing. Though load testing &
Stress testing are used synonymously for performance–related efforts, their goal is
different.
Unlike load testing where testing is conducted for specified number of users, stress
testing is conducted for the number of concurrent users beyond the specified limit. The
objective is to identify the maximum number of users the system can handle before
breaking down or degrading drastically. Since the aim is to put more stress on system,
think time of the user is ignored and the system is exposed to excess load. The goals of
load and stress testing are listed in Table 2. Refer to table 3 for the inference drawn
through the Performance Testing Efforts.
Let us take the same example of online shopping application to illustrate the objective
of stress testing. It determines the maximum number of concurrent users an online
system can service which can be beyond 1000 users (specified limit). However, there is
a possibility that the maximum load that can be handled by the system may found to
be same as the anticipated limit. The Table<##>illustrates the example specified.
Stress testing also determines the behavior of the system as user base increases. It
checks whether the system is going to degrade gracefully or crash at a shot when the
load goes beyond the specified limit.
Table 1: Load and stress testing of illustrative example
Types of Number of Concurrent users Duration
Testing
http://www.SofTReL.org 66 of 142
Software Testing Guide Book Part I: Fundamentals of Software Testing
Conducting performance testing manually is almost impossible. Load and stress tests
are carried out with the help of automated tools. Some of the popular tools to automate
performance testing are listed in table 4.
Table 4: Load and stress testing tools
Tools Vendor
http://www.SofTReL.org 67 of 142
Software Testing Guide Book Part I: Fundamentals of Software Testing
Bug Fixing
Some errors may not occur until the application is under high user load. For Example,
memory leaks can exacerbate server or application problems sustaining high load.
Performance testing helps to detect and fix such problems before launching the
application. It is therefore recommended that developers take an active role in
performance testing their applications, especially at different major milestones of the
development cycle.
‘Content Management’ has gained a predominant importance after the Web applications
took a major part of our lives. What is Content Management? As the name denotes, it is
managing the content. How do they work? Let us take a common example. You are in
China and you wanted to open the Yahoo! Chinese version. When you choose Chinese
version on the main page of Yahoo! You get to see the entire content in Chinese. Yahoo!
Would strategically plan and have various servers for various languages. When you
choose a particular version of the page, the request is redirected to the server which
manages the Chinese content page. The Content Management systems help is placing
content for various purposes and also help in displaying when the request comes in.
Content Management Testing involves:
1. Testing the distribution of the content.
2. Request, Response Time’s.
3. Content display on various browsers and operating systems.
4. Load distribution on the servers.
In fact all the performance related testing should be performed for each version of the
web application which uses the content management servers.
Regression testing as the name suggests is used to test / check the effect of changes
made in the code.
http://www.SofTReL.org 68 of 142
Software Testing Guide Book Part I: Fundamentals of Software Testing
Most of the time the testing team is asked to check last minute changes in the code just
before making a release to the client, in this situation the testing team needs to check
only the affected areas.
So in short for the regression testing the testing team should get the input from the
development team about the nature / amount of change in the fix so that testing team
can first check the fix and then the side effects of the fix.
In fact the regression testing is the testing in which maximum automation can be done.
The reason being the same set of test cases will be run on different builds multiple
times.
But again the extent of automation depends on whether the test cases will remain
applicable over the time, In case the automated test cases do not remain applicable for
some amount of time then test engineers will end up in wasting time to automate and
don’t get enough out of automation.
What is Regression testing?
Regression Testing is retesting unchanged segments of application. It involves
rerunning tests that have been previously executed to ensure that the same
results can be achieved currently as were achieved when the segment was last
tested.
The selective retesting of a software system that has been modified to ensure
that any bugs have been fixed and that no other previously working functions
have failed as a result of the reparations and that newly added features have not
created problems with previous versions of the software. Also referred to as
verification testing, regression testing is initiated after a programmer has
attempted to fix a recognized problem or has added source code to a program
that may have inadvertently introduced errors. It is a quality control measure to
ensure that the newly modified code still complies with its specified
requirements and that unmodified code has not been affected by the
maintenance activity.
http://www.SofTReL.org 69 of 142
Software Testing Guide Book Part I: Fundamentals of Software Testing
o Comparing the current test results with the previously executed test
results
In fact the regression testing is the testing in which maximum automation can be done.
The reason being the same set of test cases will be run on different builds multiple
times.
But again the extent of automation depends on whether the test
cases will remain applicable over the time, In case the
http://www.SofTReL.org 70 of 142
Software Testing Guide Book Part I: Fundamentals of Software Testing
Aim
A through understanding of the product is done now. During this phase, the test plan
and test cases for the beta phase (the next stage) is created. The errors reported are
documented internally for the testers and developers reference. No issues are usually
reported and recorded in any of the defect management/bug trackers
http://www.SofTReL.org 71 of 142
Software Testing Guide Book Part I: Fundamentals of Software Testing
• to provide input while there is still time to make significant changes as the
design evolves.
• Report errors to developers
http://www.SofTReL.org 72 of 142
Software Testing Guide Book Part I: Fundamentals of Software Testing
• Provide Test Instruction Sheet that describes items such as testing objectives,
steps to follow, data to enter, functions to invoke.
• Provide feedback forms and comments.
Role of a tester
http://www.SofTReL.org 73 of 142
Software Testing Guide Book Part I: Fundamentals of Software Testing
Results."
- Dr. Cem Kaner.
Exploratory testing is defined as simultaneous test design, test execution and bug
reporting. In this approach the tester explores the system (finding out what it is and
then testing it) without having any prior test cases or test scripts. Because of this
reason it also called as ad hoc testing, guerrilla testing or intuitive testing. But there is
some difference between them. In operational terms, exploratory testing is an
interactive process of concurrent product exploration, test design, and test execution.
The outcome of an exploratory testing session is a set of notes about the product,
failures found, and a concise record of how the product was tested. When practiced by
trained testers, it yields consistently valuable and auditable results. Every tester
performs this type of testing at one point or the other. This testing totally depends on
the skill and creativity of the tester. Different testers can explore the system in different
ways depending on their skills. Thus the tester has a very vital role to play in
exploratory testing.
This approach of testing has also been advised by SWEBOK for testing since it might
uncover the bugs, which the normal testing might not discover. A systematic approach
of exploratory testing can also be used where there is a plan to attack the system under
test. This systematic approach of exploring the system is termed Formalized exploratory
testing.
Exploratory testing is a powerful approach in the field of testing. Yet this
approach has not got the recognition and is often misunderstood and not gained the
respect it needs. In many situations it can be more productive than the scripted testing.
But the real fact is that all testers do practice this methodology sometime or the other,
most often unknowingly!
Exploratory testing believes in concurrent phases of product exploration, test
design and test execution. It is categorized under Black-box testing. It is basically a
free-style testing approach where you do not begin with the usual procedures of
elaborate test plans and test steps. The test plan and strategy is very well in the tester’s
mind. The tester asks the right question to the product / application and judges the
http://www.SofTReL.org 74 of 142
Software Testing Guide Book Part I: Fundamentals of Software Testing
outcome. During this phase he is actually learning the product as he tests it. It is
interactive and creative. A conscious plan by the tester gives good results.
Human beings are unique and think differently, with a new set of ideas
emerging. A tester has the basic skills to listen, read, think and report. Exploratory
testing is just trying to exploit this and structure it down. The richness of this process
is only limited to the breadth and depth of our imagination and the insight into the
product under test.
Exploratory testing should not be confused with the dictionary meaning of “ad-
hoc”. Ad hoc testing normally refers to a process of improvised, impromptu bug
searching. By definition, anyone can do ad hoc testing. The term “exploratory testing”--
by Dr. Cem Kaner, in Testing Computer Software--refers to a sophisticated, systematic,
thoughtful approach to ad hoc testing.
Using the systematic approach (i.e. the formalize approach) an outline of what to
attack first, its scope, the time required to be spent etc is achieved. The
approach might be using simple notes to more descriptive charters to some
vague scripts. By using the systematic approach the testing can be more
organized focusing at the goal to be reached. Thus solving the problem where
the pure Exploratory Testing might drift away from the goal.
The formalized approach used for the Exploratory Testing can vary depending on
the various criteria like the resource, time, the knowledge of the application
available etc. Depending on these criteria, the approach used to attack the
http://www.SofTReL.org 75 of 142
Software Testing Guide Book Part I: Fundamentals of Software Testing
system will also vary. It may involve creating the outlines on the notepad to
more sophisticated way by using charters etc. Some of the formal approaches
used for Exploratory Testing can be summarized as follows.
For example, consider software has been built to generate the invoices
for its customers depending on the number of the units of power that
has been consumed. In such a case exploratory testing can be done by
identifying the domain of the application. A tester who has experience of
the billing systems for the energy domain would fit better than one who
does not have any knowledge. The tester who has knowledge in the
application domain knows the terminology used as well the scenarios
that would be critical to the system. He would know the ways in which
various computations are done. In such a case, tester with good
knowledge would be familiar to the terms like to line item, billing rate,
billing cycle and the ways in which the computation of invoice would be
done. He would explore the system to the best and takes lesser time. If
the tester does not have domain knowledge required, then it would take
time to understand the various workflows as well the terminology used.
He might not be able to focus on critical areas rather focus on the other
areas.
http://www.SofTReL.org 76 of 142
Software Testing Guide Book Part I: Fundamentals of Software Testing
try to analyze to what extent it is used. The effort can be more focused by
identifying the purpose.
http://www.SofTReL.org 77 of 142
Software Testing Guide Book Part I: Fundamentals of Software Testing
Thus by identifying the primary function and secondary functions for the
system, testing can be done where more focus and effort can be given to
Primary functions compared to the secondary functions.
http://www.SofTReL.org 78 of 142
Software Testing Guide Book Part I: Fundamentals of Software Testing
knowing the workflow for such a scenario would not help the tester and
in the process loses his time.
In case he is not aware of the system, try to navigate through the
application once and get comfortable. Once the application is dully
understood, it is easier to test and explore more bugs.
Try to input 500 characters in the text box of the web application.
http://www.SofTReL.org 79 of 142
Software Testing Guide Book Part I: Fundamentals of Software Testing
cases it would help the tester explore the areas where the components
are coupled. The output of one component should be correctly sent to
other component. Hence such scenarios or workflows need to be
identified and explored more. More focus on some of the shown areas
that are more error prone.
Example: consider the online shopping application. The user adds the
items to his cart and proceeds to the payments details page. Here the
items added, their quantity etc should be properly sent to the next
module. If there is any error in any of the data transfer process, the pay
details will not be correct and the user will be billed wrong. There by
leading to a major error. In such a scenario, more focus is required in the
interfaces.
Record failures
In exploratory testing, we do the testing without having any documented
test cases. If a bug has been found, it is very difficult for us to test it after
fix. This is because there are no documented steps to navigate to that
particular scenario. Hence we need to keep track of the flow required to
reach where a bug has been found. So while testing, it is important that
at least the bugs that have been discovered are documented. Hence by
recording failures we are able to keep track of work that has been done.
This would also help even if the tester who was actually doing ET is not
available. Since the document can be referred and list all the bugs that
have been reported as well the flows for the same can be identified.
Example: for example consider the online shopping site. A bug has been
found while trying to add the items of given category into the cart. If the
tester can just document the flow as well as the error that has occurred,
http://www.SofTReL.org 81 of 142
Software Testing Guide Book Part I: Fundamentals of Software Testing
it would help the tester himself or any other tester. It can be referred
while testing the application after a fix.
Decompose the main task into smaller tasks .The smaller ones to still smaller
activities.
It is always easier to work with the smaller tasks when compared to large
tasks. This is very useful in performing Exploratory Testing because lack
of test cases might lead us to different routes. By having a smaller task,
the scope as well as the boundary are confined which will help the tester
to focus on his testing and plan accordingly.
If a big task is taken up for testing, as we explore the system, we might
get deviated from our main goal or task. It might be hard to define
boundaries if the application is a new one. With smaller tasks, the goal is
known and hence the focus and the effort required can be properly
planned.
Example: An application that provides email facility. The new users can
register and use the application for the email. In such a scenario, the
main task itself can be divided into smaller tasks. One task to check if
the UI standards are met and it is user friendly. The other task is to test
if the new users are able to register with the application and use email
facility.
Thus the two tasks are smaller which will the corresponding groups to
focus their testing process.
http://www.SofTReL.org 82 of 142
Software Testing Guide Book Part I: Fundamentals of Software Testing
Charter Summary:
A charter can be simple one to more descriptive giving the strategies and
outlines for the testing process.
Or.
Test the application if the report is being generated for the date before
01/01/2000.Use the use cases models for identifying the workflows.
session designed depends on the tester and the charter. After the session
is completed, each session is debriefed. The primary objective in the
debriefing is to understand and accept the session report. Another
objective is to provide feedback and coaching to the tester. The
debriefings would help the manager to plan the sessions in future and
also to estimate the time required for testing the similar functionality.
The time spent “on charter” and “on opportunity” is also noted.
Opportunity testing is any testing that doesn’t fit the charter of the
session. The tester is not restricted to his charter, and hence allowed to
deviate from the goal specified if there is any scope of finding an error.
A session can be broadly classified into three tasks (namely the TBS
metrics).
Session test up: Time required in setting up the application under test.
Test design and execution: Time required scanning the product and test.
Bug investigation and reporting: Time required finding the bugs and
reporting to the concerned.
http://www.SofTReL.org 84 of 142
Software Testing Guide Book Part I: Fundamentals of Software Testing
In Procedural testing, the tester executes readily available test cases, which are
written based on the requirement specifications. Although the test cases are
executed completely, defects were found in the software while doing exploratory
testing by just wandering through the product blindly. Just exploring the
product without sight was akin to groping in the dark and did not help the
testers unearth all the hidden bugs in the software as they were not very sure
about the areas that needed to be explored in the software. A reliable basis was
needed for exploring the software. Thus Defect driven exploratory testing is an
idea of exploring that part of the product based on the results obtained during
procedural testing. After analyzing the defects found during the DDET process,
http://www.SofTReL.org 85 of 142
Software Testing Guide Book Part I: Fundamentals of Software Testing
it was found that these were the most critical bugs, which were camouflaged in
the software and which if present could have made the software ‘Not fit for Use’.
There are some pre requisites for DDET:
o In-depth knowledge of the product.
o Procedural Testing has to be carried out.
o Defect Analysis based on Scripted Tests.
Advantages of DDET:
o Tester has clear clues on the areas to be explored.
o Goal oriented approach , hence better results
.
o No wastage of time.
http://www.SofTReL.org 86 of 142
Software Testing Guide Book Part I: Fundamentals of Software Testing
Mission
The goal of testing needs to be understood first before the work begins. This
could be the overall mission of the test project or could be a particular functionality /
scenario. The mission is achieved by asking the right questions about the product,
designing tests to answer these questions and executing tests to get the answers. Often
the tests do not completely answer, in such cases we need to explore. The test
procedure is recorded (which could later form part of the scripted testing) and the result
status too.
Tester
The tester needs to have a general plan in mind, though may not be very
constrained. The tester needs to have the ability to design good test strategy, execute
good tests, find important problems and report them. He simply has to think out of the
box.
Time
Time available for testing is a critical factor. Time falls short due to the following
reasons:
o Many a time in project life cycles, the time and resources required in creating
the test strategy, test plan and design, execution and reporting is overlooked.
Exploratory testing becomes useful since the test plan, design and execution
happen together.
o Also when testing is essential on a short period of notice
o A new feature is implemented
http://www.SofTReL.org 87 of 142
Software Testing Guide Book Part I: Fundamentals of Software Testing
o Change request come in much later stage of the cycle when much of the testing
is done with
Test Strategy
It is important to identify the scope of the test to be carried. This is dependent on
the project approach to testing. The test manager / test lead can decide the scope
and convey the same to the test team.
Test design and execution
The tester crafts the test by systematically exploring the product. He defines his
approach, analyze the product, and evaluate the risk
Documentation
The written notes / scripts of the tester are reviewed by the test lead / manager.
These later form into new test cases or updated test materials.
Exploratory testing fits almost in any kind of testing projects, projects with
rigorous test plans and procedures or in projects where testing is not dictated
completely in advance. The situations where exploratory testing could fit in are:
The basic rule is this: exploratory testing is called for any time the next test you should
perform is not obvious, or when you want to go beyond the obvious.
http://www.SofTReL.org 88 of 142
Software Testing Guide Book Part I: Fundamentals of Software Testing
A good exploratory tester always asks himself, what’s the best test I can perform now?
They remain alert for new opportunities.
Advantages
Exploratory testing is advantageous when
• Rapid testing is essential
• Test case development time not available
• Need to cover high risk areas with more inputs
• Need to test software with little knowledge about the specifications
• Develop new test cases or improve the existing
• Drive out monotony of normal step – by - step test execution
Drawbacks
• Skilled tester required
• Difficult to quantize
http://www.SofTReL.org 89 of 142
Software Testing Guide Book Part I: Fundamentals of Software Testing
http://www.SofTReL.org 90 of 142
Software Testing Guide Book Part I: Fundamentals of Software Testing
You can derive scenarios based on the Use Case’s. Use Case’s provide good coverage of
the requirements and functionality.
That is, while there is value in the items on the right, we value the items on the left
more." - http://www.agilemanifesto.org/
1) Agile testers treat the developers as their customer and follow the agile
manifesto. The Context driven testing principles (explained in later part) act as a
set of principles for the agile tester.
There answer is maybe but the roles and tasks are different.
http://www.SofTReL.org 91 of 142
Software Testing Guide Book Part I: Fundamentals of Software Testing
In the first definition of Agile testing we described it as one following the Context driven
principles.
The context driven principles which are guidelines for the agile tester are:
In a fast paced environment such as in Agile development the question then arises
as to what is the “Role” of testing?
http://www.SofTReL.org 92 of 142
Software Testing Guide Book Part I: Fundamentals of Software Testing
Testing is the Headlight of the agile project showing where the project is standing
now and the direction it is headed.
Testing provides the required and relevant information to the teams to take
informed and precise decisions.
The testers in agile frameworks get involved in much more than finding “software
bugs”, anything that can “bug” the potential user is a issue for them but testers
don’t make the final call, it’s the entire team that discusses over it and takes a
decision over a potential issues.
A firm belief of Agile practitioners is that any testing approach does not assure
quality it’s the team that does (or doesn’t) do it, so there is a heavy emphasis on the
skill and attitude of the people involved.
Agile Testing is not a game of “gotcha”, it’s about finding ways to set goals rather
than focus on mistakes.
Test-First Programming
Developers write unit tests before coding. It has been noted that this kind of
approach motivates the coding, speeds coding and also and improves design
results in better designs (with less coupling and more cohesion)
It supports a practice called Refactoring (discussed later on).
http://www.SofTReL.org 93 of 142
Software Testing Guide Book Part I: Fundamentals of Software Testing
Refactoring
Refactoring is the practice changing a software system in such a way that
it does not alter the external behavior of the code yet improves its internal
structure.
Traditional development tries to understand how all the code will work
together in advance. This is the design. With agile methods, this difficult
process of imagining what code might look like before it is written is
avoided. Instead, the code is restructured as needed to maintain a
coherent design. Frequent refactoring allows less up-front planning of
design.
Agile methods replace high-level design with frequent redesign
(refactoring). Successful refactoring But it also requires a way of ensuring
checking whether that the behavior wasn’t inadvertently changed. That’s
where the tests come in.
Make the simplest design that will work and add complexity only when
needed and refactor as necessary.
Refactoring requires unit tests to ensure that design changes (refactorings)
don’t break existing code.
Acceptance Testing
Make up user experiences or User stories, which are short descriptions of
the features to be coded.
Acceptance tests verify the completion of user stories.
Ideally they are written before coding.
http://www.SofTReL.org 94 of 142
Software Testing Guide Book Part I: Fundamentals of Software Testing
With all these features and process included we can define a practice for Agile testing
encompassing the following features.
Looking deep into each of these practices we can describe each of them as:
Conversational Test Creation
Test case writing should be a collaborative activity including majority of the
entire team. As the customers will be busy we should have someone
representing the customer.
Defining tests is a key activity that should include programmers and
customer representatives.
Don't do it alone.
Coaching Tests
A way of thinking about Acceptance Tests.
Turn user stories into tests.
Tests should provide Goals and guidance, Instant feedback and Progress
measurement
Tests should be in specified in a format that is clear enough that users/
customers can understand and that is specific enough that it can be
executed
Specification should be done by example.
http://www.SofTReL.org 95 of 142
Software Testing Guide Book Part I: Fundamentals of Software Testing
Exploratory Learning
Plan to explore, learn and understand the product with each iteration.
Look for bugs, missing features and opportunities for improvement.
We don’t understand software until we have used it.
We believe that Agile Testing is a major step forward. You may disagree. But regardless
Agile Programming is the wave of the future. These practices will develop and some of
the extreme edges may be worn off, but it’s only growing in influence and attraction.
Some testers may not like it, but those who don’t figure out how to live with it are
simply going to be left behind.
Some testers are still upset that they don’t have the authority to block the release. Do
they think that they now have the authority to block the adoption of these new
development methods? They’ll need to get on this ship and if they want to try to keep it
from the shoals. Stay on the dock if you wish. Bon Voyage!
http://www.SofTReL.org 96 of 142
Software Testing Guide Book Part I: Fundamentals of Software Testing
Each API is supposed to behave the way it is coded, i.e. it is functionality specific. These
APIs may offer different results for different type of the input provided. The errors or the
exceptions returned may also vary. However once integrated within a product, the
common functionality covers a very minimal code path of the API and the functionality
testing / integration testing may cover only those paths. By considering each API as a
black box, a generalized approach of testing can be applied. But, there may be some
paths which are not tested and lead to bugs in the application. Applications can be
viewed and treated as APIs from a testing perspective.
There are some distinctive attributes that make testing of APIs slightly different from
testing other common software interfaces like GUI testing.
Testing APIs requires a thorough knowledge of its inner workings - Some APIs may
interact with the OS kernel, other APIs, with other software to offer their
functionality. Thus an understanding of the inner workings of the interface
would help in analyzing the call sequences and detecting the failures caused.
Adequate programming skills - API tests are generally in the form of sequences of
calls, namely, programs. Each tester must possess expertise in the programming
language(s) that are targeted by the API. This would help the tester to review and
scrutinize the interface under test when the source code is available.
Lack of Domain knowledge – Since the testers may not be well trained in using
the API, a lot of time might be spent in exploring the interfaces and their usage.
This problem can be solved to an extent by involving the testers from the initial
stage of development. This would help the testers to have some understanding
on the interface and avoid exploring while testing.
http://www.SofTReL.org 97 of 142
Software Testing Guide Book Part I: Fundamentals of Software Testing
and usage scenarios. Hence having proper documentation would help test
designer design the tests faster.
Access to source code – The availability of the source code would help tester to
understand and analyze the implementation mechanism used; and can identify
the loops or vulnerabilities that may cause errors. Thus if the source code is not
available then the tester does not have a chance to find anomalies that may
exist in the code.
Testing of API calls can be done in isolation or in Sequence to vary the order in which
the functionality is exercised and to make the API produce useful results from these
tests. Designing tests is essentially designing sequences of API calls that have a
potential of satisfying the test objectives. This in turn boils down to designing each call
with specific parameters and to building a mechanism for handling and evaluating
return values.
Thus designing of the test cases can depend on some of the general questions like
http://www.SofTReL.org 98 of 142
Software Testing Guide Book Part I: Fundamentals of Software Testing
3. Determining the content under which an API call is made. This might include
setting external environment conditions (files, peripheral devices, and so forth) and
also internal stored data that affect the API.
4. Sequencing API calls to vary the order in which the functionality is exercised and to
make the API produce useful results from successive calls.
By analyzing the problems listed above, a strategy needs to be formulated for testing the
API. The API to be tested would require some environment for it to work. Hence it is
required that all the conditions and prerequisites understood by the tester. The next
step would be to identify and study its points of entry. The GUIs would have items like
menus, buttons, check boxes, and combo lists that would trigger the event or action to
be taken. Similarly, for APIs, the input parameters, the events that trigger the API
would act as the point of entry. Subsequently, a chief task is to analyze the points of
entry as well as significant output items. The input parameters should be tested with
the valid and invalid values using strategies like the boundary value analysis and
equivalence partitioning. The fourth step is to understand the purpose of the routines,
the contexts in which they are to be used. Once all this parameter selections and
combinations are designed, different call sequences need to be explored.
Mandatory pre-setters.
Behavioral pre-setters.
http://www.SofTReL.org 99 of 142
Software Testing Guide Book Part I: Fundamentals of Software Testing
Mandatory Pre-setters
The execution of an API would require some minimal state, environment. These type of
initial conditions are classified under the mandatory initialization (Mandatory pre-
setters) for the API. For example, a non-static member function API requires an object
to be created before it could be called. This is an essential activity required for invoking
the API.
Behavioral pre-setters
To test the specific behavior of the API, some additional environmental state is required.
These types of initial conditions are called the behavioral pre-setters category of Initial
condition. These are optional conditions required by the API and need to be set before
invoking the API under test thus influencing its behavior. Since these influence the
behavior of the API under test, they are considered as additional inputs other than the
parameters
Thus to test any API, the environment required should also be clearly understood and
set up. Without these criteria, API under test might not function as required and leave
the tester’s job undone.
The availability of the source code to the testers would help in analyzing the various
inputs values that could be possible for testing the API. It would also help in
understanding the various paths which could be tested. Therefore, not only are testers
required to understand the calls, but also all the constants and data types used by the
interface.
The API needs to be tested taking into consideration the combination of different
parameter. The number of possible combinations of parameters for each call is typically
large. For a given set of parameters, if only the boundary values have been selected, the
number of combinations, while relatively diminished, may still be prohibitively large.
For example, consider an API which takes three parameters as input. The various
combinations of different values for the input values and their combinations needs to be
identified.
5.Observe the output: The outcome of an execution of an API depends upon the
behavior of that API, the test condition and the environment. The outcome of an API can
be at different ways i.e., some could generally return certain data or status but for some
of the API's, it might not return or shall be just waiting for a period of time, triggering
another event, modifying certain resource and so on.
The tester should be aware of the output that needs to be expected for the API under
test. The outputs returned for various input values like valid/invalid, boundary values
etc needs to be observed and analyzed to validate if they are as per the functionality. All
the error codes returned and exceptions returned for all the input combinations should
be evaluated.
API Testing Tools: There are many testing tools available. Depending on the level of
testing required, different tools could be used. Some of the API testing tools available
are mentioned here.
JVerify: This is from Man Machine Systems.
JVerify is a Java class/API testing tool that supports a unique invasive testing model.
The invasive model allows access to the internals (private elements) of any Java object
from within a test script. The ability to invade class internals facilitates more effective
testing at class level, since controllability and observability are enhanced. This can be
very valuable when a class has not been designed for testability.
JavaSpec: JavaSpec is a SunTest's API testing tool. It can be used to test Java
applications and libraries through their API. JavaSpec guides the users through the
entire test creation process and lets them focus on the most critical aspects of testing.
Once the user has entered the test data and assertions, JavaSpec automatically
generates self-checking tests, HTML test documentation, and detailed test reports.
For this we can write a simple c program that will do the following: -
a) Take the parameters from a text file (this file will contain many of such
input parameters).
b) Call the API with these parameters.
c) Match the actual and idle output and also check the parameters for good
values that are passed with reference (pointers).
d) Log the result.
When the handle to the device is to be closed then the corresponding function
Bool bishandledeleted = bool deletecontext (handle &h);
Here we have to call the two API’s and check if they are handled by the created
createcontext () and are deleted by the deletecontext ().
This will ensure that these two API’s are working fine.
For this we can write a simple c program that will do the following: -
The example is over simplified but this works because we are using this kind of test tool
for extensive regression testing of our API library.
Although most projects undergo continuous testing, it does not usually produce the
http://www.SofTReL.org 103 of 142
Software Testing Guide Book Part I: Fundamentals of Software Testing
It can be said that rapid testing has a structure that is built on a foundation of four
components namely,
• People
• Integrated test process
• Static Testing and
• Dynamic Testing
There is a need for people who can handle the pressure of tight schedules. They need to
be productive contributors even through the early phases of the development life cycle.
According to James Bach, a core skill is the ability to think critically.
It should also be noted that dynamic testing lies at the heart of the software testing
process, and the planning, design, development, and execution of dynamic tests should
be performed well for any testing process to be efficient.
It would help us if we scrutinize each phase of a development process to see how the
efficiency, speed and quality of testing can be improved, bearing in mind the following
factors:
• Actions that the test team can take to prevent defects from escaping. For
example, practices like extreme programming and exploratory testing.
• Actions that the test team can take to manage risk to the development schedule.
• The information that can be obtained from each phase so that the test team can
speed up the activities.
If a test process is designed around the answers to these questions, both the speed of
testing and the quality of the final product should be enhanced.
Some of the aspects that can be used while rapid testing are given below:
1. Test for link integrity
2. Test for disabled accessibility
3. Test the default settings
4. Check the navigation’s
http://www.SofTReL.org 104 of 142
Software Testing Guide Book Part I: Fundamentals of Software Testing
For testing at each level, we may have to address the requirements. One integration and
the system test case may address multiple requirements.
No
Requirement 1 +ve/-ve 1,2,3,4
Requirement 2 +ve/-ve 1,2,3,4
Requirement 3 +ve/-ve 1,2,3,4
Requirement 4 +ve/-ve 1,2,3,4
…
…
…
…
…
…
…
Requirement N +ve/-ve 1,2,3,4
TESTER TESTER DEVELOPER TEST LEAD
The test strategy must give a clear vision of what the testing team will do for the whole
project for the entire duration. This document will/may be presented to the client also,
if needed. The person, who prepares this document, must be functionally strong in the
product domain, with a very good experience, as this is the document that is going to
drive the entire team for the testing activities. Test strategy must be clearly explained to
the testing team members tight at the beginning of the project.
The plans are to be prepared by experienced people only. In all test plans, the ETVX
{Entry-Task-Validation-Exit} criteria are to be mentioned. Entry means the entry point
to that phase. For example, for unit testing, the coding must be complete and then only
one can start unit testing. Task is the activity that is performed. Validation is the way in
which the progress and correctness and compliance are verified for that phase. Exit
tells the completion criteria of that phase, after the validation is done. For example, the
exit criterion for unit testing is all unit test cases must pass.
ETVX is a modeling technique for developing worldly and atomic level models. It sands
for Entry, Task, Verification and Exit. It is a task-based model where the details of each
task are explicitly defined in a specification table against each phase i.e. Entry, Exit,
Task, Feedback In, Feedback Out, and measures.
There are two types of cells, unit cells and implementation cells. The implementation
cells are basically unit cells containing the further tasks.
For example if there is a task of size estimation, then there will be a unit cell of size
estimation. Then since this task has further tasks namely, define measures, estimate
size. The unit cell containing these further tasks will be referred to as the
implementation cell and a separate table will be constructed for it.
A purpose is also stated and the viewer of the model may also be defined e.g. top
management or customer.
18.2.1.2Sequence of Testing
The sequences of test activities that are to be carried out in this phase are to be listed in
this section. This includes, whether to execute positive test cases first or negative test
cases first, to execute test cases based on the priority, to execute test cases based on
test groups etc. Positive test cases prove that the system performs what is supposed to
do; negative test cases prove that the system does not perform what is not supposed to
do. Testing the screens, files, database etc., are to be given in proper sequence.
18.2.2.1Sequence of Integration
When there are multiple modules present in an application, the sequence in which they
are to be integrated will be specified in this section. In this, the dependencies between
the modules play a vital role. If a unit B has to be executed, it may need the data that is
fed by unit A and unit X. In this case, the units A and X have to be integrated and then
using that data, the unit B has to be tested. This has to be stated to the whole set of
units in the program. Given this correctly, the testing activities will lead to the product,
slowly building the product, unit by unit and then integrating them.
need to list the units and for what purpose it talks to the others need to be mentioned.
This will not go into technical aspects, but at a higher level, this has to be explained in
plain English.
Apart from the above sections, the following sections are addressed, very specific to
integration testing.
• Integration Testing Tools
• Priority of Program interfaces
• Naming convention for test cases
• Status reporting mechanism
• Regression test approach
• ETVX criteria
• Build/Refresh criteria {When multiple programs or objects are to be linked to
arrived at single product, and one unit has some modifications, then it may
need to rebuild the entire product and then load it into the integration test
environment. When and how often, the product is rebuilt and refreshed is to be
mentioned}.
18.2.3.1What is to be tested?
This section defines the scope of system testing, very specific to the project. Normally,
the system testing is based on the requirements. All requirements are to be verified in
the scope of system testing. This covers the functionality of the product. Apart from this
what special testing is performed are also stated here.
Since this is just one level of testing done by the client for the overall product, it may
include test cases including the unit and integration test level details.
A sample Test Plan Outline along with their description is as shown below:
2. INTRODUCTION
http://www.SofTReL.org 112 of 142
Software Testing Guide Book Part I: Fundamentals of Software Testing
13. RESPONSIBILITIES
Who does the tasks in Section 10?
What does the user do?
15. SCHEDULE
16. RESOURCES
18. APPROVALS
The schedule details of the various test pass such as Unit tests, Integration tests,
System Tests should be clearly mentioned along with the estimated efforts.
What’s a scenario?
A scenario is a hypothetical story, used to help a person think through a complex
problem or system.
A scenario test has five key characteristics. It is (a) a story that is (b) motivating, (c)
credible, (d) complex, and (e) easy to evaluate.
The primary objective of test case design is to derive a set of tests that have the highest
attitude of discovering defects in the software. Test cases are designed based on the
analysis of requirements, use cases, and technical specifications, and they should be
developed in parallel with the software development effort.
A test case describes a set of actions to be performed and the results that are expected.
A test case should target specific functionality or aim to exercise a valid path through a
use case. This should include invalid user actions and illegal inputs that are not
necessarily listed in the use case. A test case is described depends on several factors,
e.g. the number of test cases, the frequency with which they change, the level of
automation employed, the skill of the testers, the selected testing methodology, staff
turnover, and risk.
Test case ID - The test case id must be unique across the application
Test case description - The test case description must be very brief.
Test prerequisite - The test pre-requisite clearly describes what should be present in
the system, before the test can be executes.
Test Inputs - The test input is nothing but the test data that is prepared to be fed to
the system.
Test steps - The test steps are the step-by-step instructions on how to carry out the
test.
Expected Results - The expected results are the ones that say what the system must
give as output or how the system must react based on the test steps.
Actual Results – The actual results are the ones that say outputs of the action for the
given inputs or how the system reacts for the given inputs.
Pass/Fail - If the Expected and Actual results are same then test is Pass otherwise Fail.
The test cases are classified into positive and negative test cases. Positive test cases are
designed to prove that the system accepts the valid inputs and then process them
correctly. Suitable techniques to design the positive test cases are Specification derived
tests, Equivalence partitioning and State-transition testing. The negative test cases are
designed to prove that the system rejects invalid inputs and does not process them.
Suitable techniques to design the negative test cases are Error guessing, Boundary
value analysis, internal boundary value testing and State-transition testing. The test
cases details must be very clearly specified, so that a new person can go through the
test cases step and step and is able to execute it. The test cases will be explained with
specific examples in the following section.
For example consider online shopping application. At the user interface level the client
request the web server to display the product details by giving email id and Username.
The web server processes the request and will give the response. For this application we
will design the unit, Integration and system test cases.
These are very specific to a particular unit. The basic functionality of the unit is to be
understood based on the requirements and the design documents. Generally, Design
document will provide a lot of information about the functionality of a unit. The Design
document has to be referred before UTC is written, because it provides the actual
functionality of how the system must behave, for given inputs.
For example, In the Online shopping application, If the user enters valid Email id and
Username values, let us assume that Design document says, that the system must
display a product details and should insert the Email id and Username in database
table. If user enters invalid values the system will display appropriate error message
and will not store it in database.
Test Prerequisite: The user should have access to Customer Login screen form screen
Before designing the integration test cases the testers should go through the Integration
test plan. It will give complete idea of how to write integration test cases. The main aim
of integration test cases is that it tests the multiple modules together. By executing
these test cases the user can find out the errors in the interfaces between the Modules.
For example, in online shopping, there will be Catalog and Administration module. In
catalog section the customer can track the list of products and can buy the products
online. In administration module the admin can enter the product name and
information related to it.
The system test cases meant to test the system as per the requirements; end-to end.
This is basically to make sure that the application works as per SRS. In system test
cases, (generally in system testing itself), the testers are supposed to act as an end
user. So, system test cases normally do concentrate on the functionality of the system,
inputs are fed through the system and each and every check is performed using the
system itself. Normally, the verifications done by checking the database tables directly
or running programs manually are not encouraged in the system test.
The system test must focus on functional groups, rather than identifying the program
units. When it comes to system testing, it is assume that the interfaces between the
modules are working fine (integration passed).
Ideally the test cases are nothing but a union of the functionalities tested in the unit
testing and the integration testing. Instead of testing the system inputs outputs through
database or external programs, everything is tested through the system itself. For
example, in a online shopping application, the catalog and administration screens
(program units) would have been independently unit tested and the test results would
be verified through the database. In system testing, the tester will mimic as an end user
and hence checks the application through its output.
http://www.SofTReL.org 119 of 142
Software Testing Guide Book Part I: Fundamentals of Software Testing
There are occasions, where some/many of the integration and unit test cases are
repeated in system testing also; especially when the units are tested with test stubs
before and not actually tested with other real modules, during system testing those
cases will be performed again with real modules/data in
19. Defect Management
Defects determine the effectiveness of the Testing what we do. If there are no defects, it
directly implies that we don’t have our job. There are two points worth considering here,
either the developer is so strong that there are no defects arising out, or the test
engineer is weak. In many situations, the second is proving correct. This implies that
we lack the knack. In this section, let us understand Defects.
But as for a test engineer all are same as the above definition is only for the purpose of
documentation or indicative.
Duplicate,
Reject or More Close
Info
Update Defect
http://www.SofTReL.org 121 of 142
Software Testing Guide Book Part I: Fundamentals of Software Testing
Cancel
Defects are analyzed to identify which are the major causes of defect and which is the
phase that introduces most defects. This can be achieved by performing Pareto analysis
of defect causes and defect introduction phases. The main requirements for any of these
analysis is Software Defect Metrics.
Test effectiveness: ‘t / (t+Uat) where t=total no. of defects reported during testing
and Uat = total no. of defects reported during User acceptance testing
User Acceptance Testing is generally carried out using the Acceptance Test Criteria
according to the Acceptance Test Plan.
Software Process Metrics are measures which provide information about the
performance of the development process itself.
Purpose:
Derived Metrics
1. Overall Review Effectiveness (ORE)
2. Overall Test Effectiveness
Peer Reviews
Metrics Collected
http://www.SofTReL.org 124 of 142
Software Testing Guide Book Part I: Fundamentals of Software Testing
Metric Representation
Percentage
Calculated at
Stage completion
Calculated from
Software Project Plan for planned number of days for completing each stage and for
actual number of days taken to complete each stage
Defect Removal Efficiency (DRE)
Description
This metric will indicate the effectiveness of the defect identification and removal in
stages for a given project
Formula
• Requirements: DRE = [(Requirement defects corrected during Requirements
phase) / (Requirement defects injected during Requirements phase)] * 100
• Design: DRE = [(Design defects corrected during Design phase) / (Defects
identified during Requirements phase + Defects injected during Design
phase)] * 100
• Code: DRE = [(Code defects corrected during Coding phase) / (Defects
identified during Requirements phase + Defects identified during Design
phase + Defects injected during coding phase)] * 100
• Overall: DRE = [(Total defects corrected at all phases before delivery) / (Total
defects detected at all phases before and after delivery)] * 100
Metric Representation
Percentage
Calculated at
Stage completion or Project Completion
Calculated from
Bug Reports and Peer Review Reports
Metric Representation
• Percentage
Calculated at
• Monthly
• Stage completion or Project Completion
Calculated from
• Peer reviews, Formal Reviews
• Test Reports
• Customer Identified Defects
Overall Test Effectiveness (OTE)
Description
This metric will indicate the effectiveness of the Testing process in identifying the
defects for a given project during the testing stage
Formula
• Overall Test Effectiveness: OTE = [(Number of defects found during testing) /
(Total number of defects found during Testing + Number of defects found
during post delivery)] * 100
Metric Representation
• Percentage
Calculated at
• Monthly
• Build completion or Project Completion
Calculated from
• Test Reports
• Customer Identified Defects
Effort Variance (EV)
Description
This metric gives the variation of actual effort vs. the estimated effort. This is
calculated for each project Stage wise
Formula
• EV = [(Actual person hours – Estimated person hours) / Estimated person
hours] * 100
Metric Representation
• Percentage
Calculated at
• Stage completion as identified in SPP
http://www.SofTReL.org 127 of 142
Software Testing Guide Book Part I: Fundamentals of Software Testing
Calculated from
• Estimation sheets for estimated values in person hours, for each activity
within a given stage and Actual Worked Hours values in person hours.
Cost Variance (CV)
Description
This metric gives the variation of actual cost Vs the estimated cost. This is
calculated for each project Stage wise
Formula
• CV = [(Actual Cost – Estimated Cost) / Estimated Cost] * 100
Metric Representation
• Percentage
Calculated at
• Stage completion
Calculated from
• Estimation sheets for estimated values in dollars or rupees, for each activity
within a given stage
• Actual cost incurred
Size Variance
Description
This metric gives the variation of actual size Vs. the estimated size. This is
calculated for each project stage wise
Formula
• Size Variance = [(Actual Size – Estimated Size) / Estimated Size] * 100
Metric Representation
• Percentage
Calculated at
• Stage completion
• Project Completion
Calculated from
• Estimation sheets for estimated values in Function Points or KLOC
• Actual size
Description
This metric will indicate the effort spent on preparation for Review. Use this to
calculate for languages used in the Project
Formula
For every language (such as C, C++, Java, XSL, etc…) used, calculate
• Monthly
• Completion of Review
Calculated from
• Peer Review Report
• Peer Review Defect List
Review Effectiveness
Description
This metric will indicate the effectiveness of the Review process
Formula
Review Effectiveness = [(Number of defects found by Reviews) / ((Total number of
defects found by reviews) + Testing)] * 100
Metric Representation
• Percentage
Calculated at
• Completion of Review or Completion of Testing stage
Calculated from
• Peer Review Report
• Peer Review Defect List
• Bugs Reported by Testing
Total number of defects found by Reviews
Description
This metric will indicate the total number of defects identified by the Review
process. The defects are further categorized as High, Medium or Low
Formula
Total number of defects identified in the Project
Metric Representation
• Defects per Stage
Calculated at
• Completion of Reviews
Calculated from
• Peer Review Report
• Peer Review Defect List
This metric will indicate the effort expended in each stage for reviews to the defects
found
Formula
• Defects / Review effort
Metric Representation
• Defects / Review effort
Calculated at
• Completion of Reviews
Calculated from
• Peer Review Report
• Peer Review Defect List
Metric Representation
• Number
Calculated at
• Stage completion
Calculated from
• Change Request
• Software Requirements Specification
Requirements to Design Traceability
Description
This metric provides the analysis on the number of requirements designed to the
number of requirements that were not designed
Formula
• Total Number of Requirements
• Number of Requirements Designed
• Number of Requirements not Designed
Metric Representation
• Number
Calculated at
• Stage completion
Calculated from
• SRS
• Detail Design
Design to Requirements Traceability
Description
This metric provides the analysis on the number of design elements matching
requirements to the number of design elements not matching requirements
Formula
• Number of Design elements
• Number of Design elements matching Requirements
• Number of Design elements not matching Requirements
Metric Representation
• Number
Calculated at
• Stage completion
Calculated from
• SRS
http://www.SofTReL.org 132 of 142
Software Testing Guide Book Part I: Fundamentals of Software Testing
• Detail Design
Requirements to Test case Traceability
Description
This metric provides the analysis on the number of requirements tested Vs the
number of requirements not tested
Formula
• Number of Requirements
• Number of Requirements Tested
• Number of Requirements not Tested
Metric Representation
• Number
Calculated at
• Stage completion
Calculated from
• SRS
• Detail Design
• Test Case Specification
Test cases to Requirements traceability
Description
This metric provides the analysis on the number of test cases matching
requirements Vs the number of test cases not matching requirements
Formula
• Number of Requirements
• Number of Test cases with matching Requirements
• Number of Test cases not matching Requirements
Metric Representation
• Number
Calculated at
• Stage completion
Calculated from
• SRS
• Test Case Specification
Number of defects in coding found during testing by severity
Description
This metric provides the analysis on the number of defects by the severity
Formula
http://www.SofTReL.org 133 of 142
Software Testing Guide Book Part I: Fundamentals of Software Testing
• Number of Defects
• Number of defects of low priority
• Number of defects of medium priority
• Number of defects of high priority
Metric Representation
• Number
Calculated at
• Stage completion
Calculated from
• Bug Report
Defects – Stage of origin, detection, removal
Description
This metric provides the analysis on the number of defects by the stage of origin,
detection and removal.
Formula
• Number of Defects
• Stage of origin
• Stage of detection
• Stage of removal
Metric Representation
• Number
Calculated at
• Stage completion
Calculated from
• Bug Report
Defect Density
Description
This metric provides the analysis on the number of defects to the size of the work
product
Formula
Defect Density = [Total no. of Defects / Size (FP / KLOC)] * 100
Metric Representation
• Percentage
Calculated at
• Stage completion
Calculated from
http://www.SofTReL.org 134 of 142
Software Testing Guide Book Part I: Fundamentals of Software Testing
• Defects List
• Bug Report
One interesting and useful approach to arrive at the suitable metrics is using the
Goal-Question-Metric Technique.
As evident from the name, the GQM model consists of three layers; a Goal, a Set of
Questions, and lastly a Set of Corresponding Metrics. It is thus a hierarchical
structure starting with a goal (specifying purpose of measurement, object to be
measured, issue to be measured, and viewpoint from which the measure is taken).
The goal is refined into several questions that usually break down the issue into its
major components. Each question is then refined into metrics, some of them
objective, some of them subjective. The same metric can be used in order to answer
different questions under the same goal. Several GQM models can also have
questions and metrics in common, making sure that, when the measure is actually
taken, the different viewpoints are taken into account correctly (i.e., the metric
might have different values when taken from different viewpoints).
In order to give an example of application of the model:
Goal Purpose Issue Object View Point Improve the timeliness of Change Request
Processing from the Project Manager’s
viewpoint
Question What is the current Change Request
Processing Speed?
Metric Average Cycle Time
Standard Deviation
http://www.SofTReL.org 135 of 142
Software Testing Guide Book Part I: Fundamentals of Software Testing
References
• Effective Methods of Software Testing, William E Perry.
• Software Engineering – A Practitioners Approach, Roger Pressman.
• An API Testing Method by Alan A Jorgensen and James A Whittaker.
• API Testing Methodology by Anoop Kumar P, working for Novell Software
Development (I) Pvt Ltd., Bangalore.
• “Why is API Testing Different “by Nikhil Nilakantan, Hewlett Packard and
Ibrahim K. El-Far, Florida Institute of Technology.
• Test Strategy & Test Plan Preparation – Training course attended @ SoftSmith
• Designing Test Cases - Cem Kaner, J.D., Ph.D.
• Scenario Testing - Cem Kaner, J.D., Ph.D.
• Exploratory Testing Explained, v.1.3 4/16/03 by James Bach.
• Exploring Exploratory Testing by Andy Tinkham and Cem Kaner.
• Session-Based Test Management by Jonathan Bach (first published in Software
Testing and Quality Engineering magazine, 11/00).
• Defect Driven Exploratory Testing (DDET) by Ananthalakshmi.
• Software Engineering Body of Knowledge v1.0
(http://www.sei.cmu.edu/publications)
• Unit Testing guidelines by Scott Highet (http://www.Stickyminds.com)
• http://www.sasystems.com
• http://www.softwareqatest.com
• http://www.eng.mu.edu/corlissg/198.2001/KFN_ch11-tools.html
• http://www.ics.uci.edu/~jrobbins/ics125w04/nonav/howto-reviews.html
• IEEE SOFTWARE REVIEWS Std 1028-1997
• http://www.agilemanifesto.org
• http://www.processimpact.com
• The Goal Question Metric Approach, Victor R. Basili1 Gianluigi Caldiera1 H.
Dieter Rombach2
• http://www.webopedia.com
translation to a variety of formats suitable for input to text formatters. A copy made in
an otherwise Transparent file format whose markup, or absence of markup, has been
arranged to thwart or discourage subsequent modification by readers is not
Transparent. An image format is not Transparent if used for any substantial amount of
text. A copy that is not "Transparent" is called "Opaque".
Examples of suitable formats for Transparent copies include plain ASCII without
markup, Texinfo input format, LaTeX input format, SGML or XML using a publicly
available DTD, and standard-conforming simple HTML, PostScript or PDF designed for
human modification. Examples of transparent image formats include PNG, XCF and
JPG. Opaque formats include proprietary formats that can be read and edited only by
proprietary word processors, SGML or XML for which the DTD and/or processing tools
are not generally available, and the machine-generated HTML, PostScript or PDF
produced by some word processors for output purposes only.
The "Title Page" means, for a printed book, the title page itself, plus such following
pages as are needed to hold, legibly, the material this License requires to appear in the
title page. For works in formats which do not have any title page as such, "Title Page"
means the text near the most prominent appearance of the work's title, preceding the
beginning of the body of the text.
A section "Entitled XYZ" means a named subunit of the Document whose title either is
precisely XYZ or contains XYZ in parentheses following text that translates XYZ in
another language. (Here XYZ stands for a specific section name mentioned below, such
as "Acknowledgements", "Dedications", "Endorsements", or "History".) To "Preserve the
Title" of such a section when you modify the Document means that it remains a section
"Entitled XYZ" according to this definition.
The Document may include Warranty Disclaimers next to the notice which states that
this License applies to the Document. These Warranty Disclaimers are considered to be
included by reference in this License, but only as regards disclaiming warranties: any
other implication that these Warranty Disclaimers may have is void and has no effect
on the meaning of this License.
2. VERBATIM COPYING
You may copy and distribute the Document in any medium, either commercially or
noncommercially, provided that this License, the copyright notices, and the license
notice saying this License applies to the Document are reproduced in all copies, and
that you add no other conditions whatsoever to those of this License. You may not use
technical measures to obstruct or control the reading or further copying of the copies
you make or distribute. However, you may accept compensation in exchange for copies.
If you distribute a large enough number of copies you must also follow the conditions in
section 3.
You may also lend copies, under the same conditions stated above, and you may
publicly display copies.
3. COPYING IN QUANTITY
If you publish printed copies (or copies in media that commonly have printed covers) of
the Document, numbering more than 100, and the Document's license notice requires
Cover Texts, you must enclose the copies in covers that carry, clearly and legibly, all
these Cover Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on the
back cover. Both covers must also clearly and legibly identify you as the publisher of
these copies. The front cover must present the full title with all words of the title equally
prominent and visible. You may add other material on the covers in addition. Copying
with changes limited to the covers, as long as they preserve the title of the Document
and satisfy these conditions, can be treated as verbatim copying in other respects.
If the required texts for either cover are too voluminous to fit legibly, you should put the
first ones listed (as many as fit reasonably) on the actual cover, and continue the rest
onto adjacent pages.
If you publish or distribute Opaque copies of the Document numbering more than 100,
you must either include a machine-readable Transparent copy along with each Opaque
copy, or state in or with each Opaque copy a computer-network location from which the
http://www.SofTReL.org 139 of 142
Software Testing Guide Book Part I: Fundamentals of Software Testing
• L. Preserve all the Invariant Sections of the Document, unaltered in their text
and in their titles. Section numbers or the equivalent are not considered part of
the section titles.
• M. Delete any section Entitled "Endorsements". Such a section may not be
included in the Modified Version.
• N. Do not retitle any existing section to be Entitled "Endorsements" or to conflict
in title with any Invariant Section.
• O. Preserve any Warranty Disclaimers.
If the Modified Version includes new front-matter sections or appendices that qualify as
Secondary Sections and contain no material copied from the Document, you may at
your option designate some or all of these sections as invariant. To do this, add their
titles to the list of Invariant Sections in the Modified Version's license notice. These
titles must be distinct from any other section titles.
You may add a section Entitled "Endorsements", provided it contains nothing but
endorsements of your Modified Version by various parties--for example, statements of
peer review or that the text has been approved by an organization as the authoritative
definition of a standard.
You may add a passage of up to five words as a Front-Cover Text, and a passage of up
to 25 words as a Back-Cover Text, to the end of the list of Cover Texts in the Modified
Version. Only one passage of Front-Cover Text and one of Back-Cover Text may be
added by (or through arrangements made by) any one entity. If the Document already
includes a cover text for the same cover, previously added by you or by arrangement
made by the same entity you are acting on behalf of, you may not add another; but you
may replace the old one, on explicit permission from the previous publisher that added
the old one.
The author(s) and publisher(s) of the Document do not by this License give permission
to use their names for publicity for or to assert or imply endorsement of any Modified
Version.
5. COMBINING DOCUMENTS
You may combine the Document with other documents released under this License,
under the terms defined in section 4 above for modified versions, provided that you
include in the combination all of the Invariant Sections of all of the original documents,
unmodified, and list them all as Invariant Sections of your combined work in its license
notice, and that you preserve all their Warranty Disclaimers.
The combined work need only contain one copy of this License, and multiple identical
Invariant Sections may be replaced with a single copy. If there are multiple Invariant
Sections with the same name but different contents, make the title of each such section
unique by adding at the end of it, in parentheses, the name of the original author or
publisher of that section if known, or else a unique number. Make the same adjustment
to the section titles in the list of Invariant Sections in the license notice of the combined
work.
In the combination, you must combine any sections Entitled "History" in the various
original documents, forming one section Entitled "History"; likewise combine any
sections Entitled "Acknowledgements", and any sections Entitled "Dedications". You
must delete all sections Entitled "Endorsements."
6. COLLECTIONS OF DOCUMENTS
You may make a collection consisting of the Document and other documents released
under this License, and replace the individual copies of this License in the various
documents with a single copy that is included in the collection, provided that you follow
the rules of this License for verbatim copying of each of the documents in all other
respects.
You may extract a single document from such a collection, and distribute it individually
under this License, provided you insert a copy of this License into the extracted
document, and follow this License in all other respects regarding verbatim copying of
that document.
7. AGGREGATION WITH INDEPENDENT WORKS
A compilation of the Document or its derivatives with other separate and independent
documents or works, in or on a volume of a storage or distribution medium, is called an
"aggregate" if the copyright resulting from the compilation is not used to limit the legal
rights of the compilation's users beyond what the individual works permit. When the
Document is included in an aggregate, this License does not apply to the other works in
the aggregate which are not themselves derivative works of the Document.
If the Cover Text requirement of section 3 is applicable to these copies of the Document,
then if the Document is less than one half of the entire aggregate, the Document's Cover
Texts may be placed on covers that bracket the Document within the aggregate, or the
electronic equivalent of covers if the Document is in electronic form. Otherwise they
must appear on printed covers that bracket the whole aggregate.
8. TRANSLATION
Translation is considered a kind of modification, so you may distribute translations of
the Document under the terms of section 4. Replacing Invariant Sections with
translations requires special permission from their copyright holders, but you may
include translations of some or all Invariant Sections in addition to the original versions
of these Invariant Sections. You may include a translation of this License, and all the
license notices in the Document, and any Warranty Disclaimers, provided that you also
include the original English version of this License and the original versions of those
notices and disclaimers. In case of a disagreement between the translation and the
original version of this License or a notice or disclaimer, the original version will prevail.
If a section in the Document is Entitled "Acknowledgements", "Dedications", or
"History", the requirement (section 4) to Preserve its Title (section 1) will typically
require changing the actual title.
9. TERMINATION
You may not copy, modify, sublicense, or distribute the Document except as expressly
provided for under this License. Any other attempt to copy, modify, sublicense or
distribute the Document is void, and will automatically terminate your rights under this
License. However, parties who have received copies, or rights, from you under this
License will not have their licenses terminated so long as such parties remain in full
compliance.
10. FUTURE REVISIONS OF THIS LICENSE
The Free Software Foundation may publish new, revised versions of the GNU Free
Documentation License from time to time. Such new versions will be similar in spirit to
the present version, but may differ in detail to address new problems or concerns. See
http://www.gnu.org/copyleft/.
Each version of the License is given a distinguishing version number. If the Document
specifies that a particular numbered version of this License "or any later version"
applies to it, you have the option of following the terms and conditions either of that
specified version or of any later version that has been published (not as a draft) by the
Free Software Foundation. If the Document does not specify a version number of this
License, you may choose any version ever published (not as a draft) by the Free
Software Foundation.