Hire 💕 9907093804 Hooghly Call Girls Service Call Girls Agency
Structural testing
1.
2. Structural testing takes into account the
code, code structure, internal design and how
they are coded.
A complimentary approach to functional
testing is called a structural testing or white
box testing.
It permits us to examine the internal
structure of the program.
3. The knowledge to the internal structure of
the code can be used to find the no. of test
cases required to guarantee a given level of
test coverage
there are using more types
1. path coverage testing
2. cyclomatic complexity
3. graph matrices
4. data flow testing
5. mutational testing
4. Path testing is the name given to a group of
test techniques based on judiciously selecting
a set of test paths through the program
two types of involves
1. generating a set of paths that will cover every
branch in the program.
2. finding a set of test cases that will execute every
path in this set of program paths.
5. Path testing is using 3 types
1. Flow graph
2. DD path graph
3. Independent path
Flow graph:-
the control flow of a program can be
analysed using a graphical representation
known as flow graph. The flow graph is a
directed graph in which nodes are either
statement or fragments of a statement, and
edges represents a flow of control.
6. i and j are nodes in the program graph,
there is an edges from node i to node j if the
statement (fragment) corresponding to node j
can be executed immediately after the
statement(fragment) corresponding to node i.
=> Using from some condition and the
condition based coding develop in program.
10. Flow graph generation is the first step of
path testing, second step for DD path graph.
DD stands for DECISION TO DECISION.
DD path graph is a directed graph in which
nodes are sequence of statements and edges
represent control flow b/w nodes.
11.
12. FLOW
GRAPH
DD PATH GRAPH
CORRESPONDING NODE
REMARKS
1 to 6 n1 There is sequence flow from node
1 to 6
7 to 10 n2 There in another sequence flow
node 7 t0 10
10 n3 Decision node, If true 13 goto else
35
11-to 14 n4 Sequence node
.
.
.
.
37 n.. Sequential exit node
13.
14. We are interested to execute all independent
path at least one duration path testing.
An independent path is any path through
the DD path graph that introduces at least one
new set of processing statement or new
conditions.
Use independent path order is ensure
1. every statement in the program has been
executed at least once.
2. every branch has been exercised for true and
false conditions
18. Properties of cyclomatic complexity
1. V(G)>= 1
2. V(G) is the maximum no. of independent paths in
graph G.
3. Inserting and deleting functional statement to G
does not affect V(G).
4. G has only one path if and if V(G)=1.
5. Inserting a new in G increase V(G) by unity.
6. V(G) depends only on the decision structure of G.
22. It has nothing to do with data flow diagram.
Concentrate points are
Statements where variables receives values.
Statement where these values are used or
referenced.
We may have few define/reference anomalies:
A variables is defined but not used/referenced.
A variables is used but never defined.
A variables is defined twice before it is used.
23. DEFINITIONS
The definitions refer to a program P that has a
program graph G(P) and a set of program variables
V.
The G(P) has a single entry node and a single exit
node.
The set of all paths in P is PATHS(P)
DEFINING NODE
Node n ∈ G(P) is a defining node of the variables
v∈V written as DEF(v,n) v is a variables ,n is a node
24. USAGE NODE
Node n ∈G(P) is a usage node of the variables
v∈V , written as USE(v,n), Predicate use (denoted as
P) iff statement n is a predicate statement otherwise
USE(v,n) is a computation use (denote as c)
DEFINITION USE and DEFINITION CLEAR
Definition node is DEF(v,m) and definition
clear is a DEF(v,m) there defining is paths (P).
25. Draw the program flow graph
Find the DD path graph
Prepare a table for define/use status
of all variables
Identify-du paths that are not dc paths
Find all du-paths
26. Multiple copies of a program are made, and each
copy is altered, this altered copy is called a MUTANT.
A mutant that is detected by a test case is termed
“killed” and the goal of mutation procedure is to find
set of test cases that are able to kill groups of mutant
programs.
Mutant are produced by applying mutant
operators.
That are including from original expression id
x+1 and the mutant for that expression is x+2.
The score associated with a test suite T and
mutants M simply
#killed *100%
#total-#equivalent