Software Testing
Software Testing
(COMPUTER SCIENCE)
SEM – V
SOFTWARE TESTING
Trupti Wani Note: This PPT is used only for educational purpose
Software Testing
4
2. Early Testing
5. Defect Clustering
6. Pesticide Paradox
So have you ever seen or heard from any of the testing team that they have
tested the software fully and there is no defect in the software? Instead of that,
every testing team confirms that the software meets all business requirements
and it is functioning as per the needs of the end user.
In the software testing industry, no one will say that there is no defect in the
software, which is quite true as testing cannot prove that the software is error-
free or defect-free.
However, the objective of testing is to find more and more hidden defects using
different techniques and methods. Testing can reveal undiscovered defects and
if no defects are found then it does not mean that the software is defect free.
Early Testing
Testers need to get involved at an early stage of the Software Development Life Cycle
(SDLC). Thus the defects during the requirement analysis phase or any documentation
defects can be identified. The cost involved in fixing such defects is very less when
compared to those that are found during the later stages of testing.
Consider the below image which shows how the cost of defect fixing gets
increased as testing move towards the live production.
Exhaustive Testing is Not Possible
It is not possible to test all the functionalities with all valid and invalid
combinations of input data during actual testing. Instead of this approach,
testing of a few combinations is considered based on priority using different
techniques.
Exhaustive testing will take unlimited efforts and most of those efforts are
ineffective. Also, the project timelines will not allow testing of so many
number of combinations. Hence it is recommended to test input data using
different methods like Equivalence Partitioning and Boundary Value
Analysis.
Testing is Context-Dependent
During testing, it may happen that most of the defects found are related to a
small number of modules. There might be multiple reasons for this like the
modules may be complex, coding related to such modules may be
complicated etc.
This is the Pareto Principle of software testing where 80% of the problems
are found in 20% of the modules.
Pesticide Paradox
Pesticide Paradox principle says that if the same set of test cases are
executed again and again over the period of time then these set of tests are
not capable enough to identify new defects in the system.
In order to overcome this “Pesticide Paradox”, the set of test cases needs
to be regularly reviewed and revised. If required a new set of test cases can
be added and the existing test cases can be deleted if they are not able to
find any more defects from the system.
Absence of Error
If the software is tested fully and if no defects are found before release, then
we can say that the software is 99% defect free. But what if this software is
tested against wrong requirements? In such cases, even finding defects and
fixing them on time would not help as testing is performed on wrong
requirements which are not as per needs of the end user.
Error, Fault, Failure
21
Error
22
Testing Debugging
Testing starts with known Debugging starts from possibly
conditions, uses predefined unknown initial conditions and
procedures and has predictable the end can not be predicted
outcomes. except statistically.
Procedure and duration of
Testing can and should be
debugging cannot be so
planned, designed and scheduled.
constrained.
Testing is a demonstration of Debugging is a deductive
error or apparent correctness. process.
Testing proves a programmer's Debugging is the programmer's
failure. justification.
Fault
25
Testing Debugging
Testing, as executes, should Debugging demands intuitive
strive to be predictable, dull, leaps, experimentation and
constrained, rigid and inhuman. freedom.
Debugging is impossible
Much testing can be done
without detailed design
without design knowledge.
knowledge.
Testing can often be done by an Debugging must be done by an
outsider. insider.
Much of test execution and Automated debugging is still a
design can be automated. dream.
What is defect?
30
Test planning
Test design
Test implementation (in case of automation)
Test execution
Test analysis
Postmortem reviews
Test initiation criteria
32
passed
Coverage of code, functionality, or requirements
Customer
Users
Developers
Includes individual/group which gather requirements,
design, build, change and maintain software
Testers
Senior management
Auditors
Challenges in testing
35
Customer
Dissatisfaction
Cost of testing
Quantity
Over testing
Under testing
Duration
The Psychology of testing
37
As you can see, software testing takes a unique set of skills. Characteristics of a good
software tester include both hard skills and soft skills. Testing isn’t for everyone. It takes
a creative, technically-minded person to be a successful tester. Approach your job with
these things in mind, and you’ll find yourself becoming a better tester over time.
Quality, QA and QC
42
According to McCall’s model, product operation category includes five software quality factors,
which deal with the requirements that directly affect the daily operation of the software. They are as
follows −
Correctness
These requirements deal with the correctness of the output of the software system. They include −
• Output mission
• The required accuracy of output that can be negatively affected by inaccurate data or
inaccurate calculations.
• The completeness of the output information, which can be affected by incomplete data.
• The up-to-dateness of the information defined as the time between the event and the response
by the software system.
• The availability of the information.
• The standards for coding and documenting the software system.
Reliability
Reliability requirements deal with service failure. They determine the maximum allowed failure rate
of the software system and can refer to the entire system or to one or more of its separate
functions.
Efficiency
It deals with the hardware resources needed to perform the different functions of the
software system. It includes processing capabilities (given in MHz), its storage
capacity (given in MB or GB) and the data communication capability (given in MBPS
or GBPS).
It also deals with the time between recharging of the system’s portable units, such
as, information system units located in portable computers, or meteorological units
placed outdoors.
Integrity
This factor deals with the software system security, that is, to prevent access to
unauthorized persons, also to distinguish between the group of people to be given
read as well as write permit.
Usability
Usability requirements deal with the staff resources needed to train a new employee
and to operate the software system.
Product Revision Quality Factors
According to McCall’s model, three software quality factors are included in the product revision
category. These factors are as follows −
Maintainability
This factor considers the efforts that will be needed by users and maintenance personnel to
identify the reasons for software failures, to correct the failures, and to verify the success of the
corrections.
Flexibility
This factor deals with the capabilities and efforts required to support adaptive maintenance
activities of the software. These include adapting the current software to additional circumstances
and customers without changing the software. This factor’s requirements also support perfective
maintenance activities, such as changes and additions to the software in order to improve its
service and to adapt it to changes in the firm’s technical or commercial environment.
Testability
Testability requirements deal with the testing of the software system as well as with its operation.
It includes predefined intermediate results, log files, and also the automatic diagnostics performed
by the software system prior to starting the system, to find out whether all components of the
system are in working order and to obtain a report about the detected faults. Another type of
these requirements deals with automatic diagnostic checks applied by the maintenance
technicians to detect the causes of software failures.
Product Transition Software Quality Factor
According to McCall’s model, three software quality factors are included in the product
transition category that deals with the adaptation of software to other environments and its
interaction with other software systems. These factors are as follows −
Portability
Portability requirements tend to the adaptation of a software system to other environments
consisting of different hardware, different operating systems, and so forth. The software
should be possible to continue using the same basic software in diverse situations.
Reusability
This factor deals with the use of software modules originally designed for one project in a
new software project currently being developed. They may also enable future projects to
make use of a given module or a group of modules of the currently developed software. The
reuse of software is expected to save development resources, shorten the development
period, and provide higher quality modules.
Interoperability
Interoperability requirements focus on creating interfaces with other software systems or
with other equipment firmware. For example, the firmware of the production machinery and
testing equipment interfaces with the production control software.
a nk yo u
T h