Software Testing Techniques: Presented To Prof. DR. Aqil Burnee & Sir. Zain Abbas
Software Testing Techniques: Presented To Prof. DR. Aqil Burnee & Sir. Zain Abbas
Software Testing Techniques: Presented To Prof. DR. Aqil Burnee & Sir. Zain Abbas
Presented to
... our goal is to ensure that all
statements and conditions have
been executed at least once ...
Continued..
White box testing (Glass Box Testing),
requires programming skills to identify all
paths through the software.
we often believe
that a path is not
likely to be executed; in fact, reality is
often counter intuitive
typographical errors are random; it's
likely that untested paths will contain
some
Basis path testing
Basis path testing is a hybrid between path
testing and branch testing:
Path Testing: Testing designed to execute all
or selected paths
through a computer program
Branch Testing: Testing designed to execute
each outcome of
each decision point in a computer program
Basis Path Testing:
Testing that fulfills the requirements of
branch testing & also tests all of the
independent paths that could be used to
construct any arbitrary path through the
computer program.
number of simple decisions + 1
or
Number of predicate nodes contained
in flow graph (G) + 1
In this case, V(G) = 4
Cyclomatic
Complexity
A number of industry studies have indicated
that the higher V(G), the higher the probability
of errors.
modules
V(G)
modules in this range are
more error prone
Basis Path
Testing Next, we derive the
independent paths:
1
Since V(G) = 4,
2 there are four paths
Path 1: 1,2,3,6,7,8
3
4
5 6
Path 2: 1,2,3,5,7,8
Path 3: 1,2,4,7,8
Path 4: 1,2,4,7,2,4,...7,8
7
Finally, we derive test cases to exercise these
8 paths.
Basis Path Testing
Notes you don't need a flow chart,
but the picture will help when
you trace program paths
count each simple logical test,
compound tests count as 2 or
more
basis path testing should be
applied to critical modules
Graph Matrices
To develop a software tool that assists in basis path
testing, a data structure, called a “graph matrix”. Can
be quite useful.
A graph matrix is a square matrix whose size (i.e.,
number of rows and columns) is equal to the number
of nodes on a flow graph
Each row and column corresponds to an identified
node, and matrix entries correspond to connections
(an edge) between nodes.
By adding a link weight to each matrix entry, the
graph matrix can become a powerful tool for
evaluating program control structure during testing
THANK YOU…!