Software Testing Chapter 1
Software Testing Chapter 1
Introduction
Learning Objectives
To study the concept of the Software Testing.
Toknow about the nature of errors.
To learn about the Testing Principles and Testing fundamentals.
Toget information about the debugging.
Long-term Goals
Reliability
Software testing Quality
Customer satisfaction Quality software
Risk management product
Post-implementation Goals
Reduced maintenance cost
Improve testing process
Fig. 1.1: Software Testing Goals
1 Immediate Goals: These goals are
also called as short term goals. These testing
goals are the immediate result after testing. These goals contain:
(i) Bug discovery: This is the immediate goal of
software testing to find errors at
any stage of software development. Numbers of the bugs are
discovered in the
early stage of testing.
(ii) Bug prevention:This is the resultant action of bug discovery.
Sem. VI) 1.3
Introduction
2. Long Term Goals:
long term. These These testing goals affect the software product quality in the
(i) Quality: Thisinclude:
(ii) goal enhances the quality of the software products.
Customer satisfaction: This goal verifies the customer's satisfaction for
developed software product.
() Rellability: It is a matter of confidence that the software will not rall.
SIOrt rellability means to gain the confidence of the customers by
them a quality product. providing
() Risk management: Risk must be done toreduce the failure of
product ama to
manage risk in different situations.
3. Post Implemented Goals: These goals are important after the software product
released. Some of them are listed below:
(1) Reduce maintenance cost: Post-released errors are costlier to fix
and
difficult to identify.
(ii) Improved software testing process: These goals improve the testing process
for future use of software projects. These goals are known as post
implementation goals.
L1.1 Nature of Errors
Software Bug:
A software bug is the common term used to describe an error, flaw, mistake, failure
or fault in a computer program or system that produces an incorrect or unexpected
result, or which causes the program to perform in an un-intended manner.
Most bugsarise from mistakes and errors in either a program's source code or its
design, but the main cause can be traced to the specification.
ASoftware bug occurs when one or more of the following is true:
The Software does not do something that the product specification says it should
do.
The Software does something that the product specification says it should not do.
1. Errors:
lead to a
The system is in a state such that further processing by the system will
failure.
a software
Anerror is a mistake, misconception or misunderstanding on the part of
a
developer. It might be typographical error, a misleading of specifications, or
misunderstanding of what a subroutine does.
The errors may be:
o Actual bugs in the code.
f the requirements or functional specifications
Missing commands, Pertormahce,
o Calculation errors.
Errors in handling or interpreting data.
Documentation - The user does not observe the ++operation described in manuals.
o Testing errors.
2. Faults:
Afault occurs when a human error results in a mistake in sonme software product(s).
For example, a developer might misunderstand a user-interface requirement and
therefore create a design that includes misunderstanding. The design fault can also
result in incorrect code, as well as incorrect instructions in user manual.
Lead to
Human Error Fault
Software
Requirements
Analysis
Design Verification
Static
Testing Coding Validat
Testing by
Execution
Testing (Dynamic
Testing)
Debugging
Production/Deployment
Fig. 1.4: Debugging,
4. Test Coverage: Verification and Testing
Exhaustive testing is impossible, not everything can be
subset of everything can be tested. tested. Not even a significant
and prioritize thoroughly. Therefore, testing needs to assign tasks
valid input case. Generally, every feature should be tested at leastreasonably
with one
We can also test input
permutations, invalid input,and non-functional
depending upon the operational of software. Highly present andrequirements
scenarios should have more profilecoverage than frequent use
insignificant scenarios. infrequently encountered and
5. Quality and Reliability:
Software quality is the degree of conformance to
and expectations. explicit or implicit requirements
Explicit: Clearly defined and documented.
o Implicit: Not clearly
defined and documented but indirectly
Requirements: Business/product/software requirements. suggested.
Expectations: End-user expectations.
Intrt
1.11
Test Analysis
Test Design
Testing Cycle
Final Testing
Post Implementation
Fig. 1.8: Software Testing Life Cycle
1. Requirements Analysis:
In this phase, Software testers
analyze the customer requirements and work with
developers during the design phase to see which requirements are
they are going to test those requirements. testable and how
It is very important to start
testing activities from the
because the cost of fixing defects is very less if it is found inrequirements phase itself
this phase rather than in
future phases.
2. Test Planning:
In thisphase, all the planning about testing is done like what needs to be tested, how
the testing will be done, test strategy to be followed, what will be the test
environment, what test methodologies will be followed, hardware and software
availability, resources, risks etc. A high level test plan document is created which
includes all the planning inputs mentioned above and circulated to the stakeholderS.
3. Test Analysis:
After test planning phase is over, test analysis phase starts. In this phase, we need to
dig deeper into project and figure out what testing needs to be carried out in each
SDLC phase. Automation activities are also decided, if automation needs to be done
for software products, how will the automation be done, how much time will it take to
automate and which features need to be automated. Non functional testing areas
(Stress and performance testing) are also analyzed and defined.
4. Test Design:
In this phase, various Black-box and White-box test design techniques are used to
those
design the test cases for testing. Testers start writing test cases by following
scripts
design techniques, if automation testing needs to be done then automation
also need to be written.
5. Test Execution and Validation:
cases designed in step 4 are
In this stage, we need to do all the test activities. All test
verified and then processed with module(s) under test.
6. Testing Cycle:
Test Execution and Bug Reporting, Bug Management.
cases are executed without errors and
In this stage, we need to do test cycles untiltest
our test plans are reached as shown in Fig. 1.9.
Run test cases
Report bugs
Bug fixing
Re-testing
Fig. 1.9: Testing Cycle
7. Final Testing and Implementation:
In this phase, the final testing is done for the software. Non functional testing like
stress, load and performance testing are performed. Software is also tested in the
production type of environment. In this phase, finaltest execution reports and all test
deliverables are prepared.
8. Post Implementation:
state, the
In this phase, the test environment is cleaned up and restored to default
A document is
process review meetings are done and lessons learnt are documented.
prepared to manage similar problems in future releases.