Software testing
Software testing
Software Testing
Software Testing
Testing is the process of executing a program
with the intention of finding errors.” – Myers
“Testing can show the presence of bugs but
never their absence.” – Dijkstra
“Program testing can be a very effective way
to show the presence of bugs, but it is
hopelessly inadequate for showing their
absence”. – Dijkstra
Why should We Test ?
Although software testing is itself an
expensive activity, yet launching of software
without testing may lead to cost potentially
much higher than that of testing, specially in
systems where human safety is involved.
In the software life cycle the earlier the
errors are discovered and removed, the lower
is the cost of their removal.
Who should Do the Testing ?
Testing requires the developers to find errors
from their software.
It is difficult for software developer to point
out errors from own creations.
Many organizations have made a distinction
between development and testing phase by
making different people responsible for each
phase.
Relationship between S/W Engg. & Testing
Software engineering is the study and application of
engineering to the design, development, and maintenance
of software and to achieve this goal,
Software testing is done as a process of evaluating that
software by manual or automatic means and verify that it
satisfies specified requirements or identify differences
between expected and actual results. So, testing of what one
creates is thus an inherent part of this process of software
development.
Phases of Software Process
Requirements Specification
Design Phase
Phase Phase
Implementation
Phase
9
IMPORTANT TERMINOLOGY
Error/Mistake: Error represents a syntax error or
misunderstanding of specifications. It is the developer mistake
that produces a fault, often it is caused by human activities such
as the typing of errors.
Bugs: Logical errors made by developers during coding or faults
in the source code.
Fault: Representation of an error where representation is the
mode of expression such as narrative text, data flow diagrams
(DFD), ER diagrams, source code etc.
Failure: This is a manifestation of an error (or defect or bug).
But, the mere presence of an error may not necessarily lead to a
failure. It occurs when a fault executes and it is the departure of
program output from the expected output.
10
LOC Code Example …
1 program double ();
2 var x,y: integer;
3 begin
4 read(x);
5 y := x * x;
6 write(y)
7 end
12
TYPES OF TESTING
Different kinds of testing are in use today, with various
classifications. We shall discuss each in the course of
study.
1. On the basis of what is to be tested:
Functional
Structural.
Manual
Automated
14
TEST PLAN
Test Plan: A document developed by the test lead which
includes how to test, when to test and who will test.
Format
i) Introduction
ii) Scope
iii) Objective
iv) Platform
v) Environment
vi) Tools
vii) Modules to be tested
viii) Modules not to be tested
ix) Exit criterion
x) Pause criterion
xi) Resume criterion
15
TEST CASES
A document which specifies a testable condition to test. A
good test case has a high probability of detecting an error.
Tests are thus valuable and useful and need to be developed,
reviewed, used, managed and saved.
Format
i) Test case ID
ii) Module ID
iii) Module name
iv) Project ID
v) Project Name
vi) Tester
vii) Assigned To
viii) Date
ix) Time
16
Test case template
TEST SUITE, SCRIPT & INCIDENT
Test Suite: According to Boris Beizer,
2. It does not involve executing the code. 2. It always involves executing the code.
3. It is human based checking of documents 3. It is computer based execution of program.
and files.
4. Verification uses methods like inspections, 4. Validation uses methods like black box
reviews, walkthroughs, and Desk-checking etc. (functional) testing, gray box testing, and
white box (structural) testing etc.
5. Verification is to check whether the 5. Validation is to check whether software
software conforms to specifications. meets the customer expectations and
requirements.
6. It can catch errors that validation cannot 6. It can catch errors that verification cannot
catch. It is low level exercise. catch. It is High Level Exercise.