SlideShare a Scribd company logo
1 of 28
 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.
 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
 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.
 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.
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.
Sequence if-then-else while
Repeat-until loop switch statement
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.
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
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
 Path 1 : 1,6.
 Path 2 :1,2,3,5.
 Path 3 :1,2,4,5.
 Path 4 :1,2,3,5,1.
 Path 5 :1,2,4,5,1.
 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.
a b
c d
3
2
4
1
a d
b
c
1 2 3 4
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.
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
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).
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
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
Structural testing
Structural testing

More Related Content

What's hot

Algorithm Development
Algorithm DevelopmentAlgorithm Development
Algorithm DevelopmentALI RAZA
 
Software engineering model
Software engineering modelSoftware engineering model
Software engineering modelManish Chaurasia
 
Chapter 02: Classes Objects and Methods Java by Tushar B Kute
Chapter 02: Classes Objects and Methods Java by Tushar B KuteChapter 02: Classes Objects and Methods Java by Tushar B Kute
Chapter 02: Classes Objects and Methods Java by Tushar B KuteTushar B Kute
 
Three address code In Compiler Design
Three address code In Compiler DesignThree address code In Compiler Design
Three address code In Compiler DesignShine Raj
 
Designing Techniques in Software Engineering
Designing Techniques in Software EngineeringDesigning Techniques in Software Engineering
Designing Techniques in Software Engineeringkirupasuchi1996
 
Polymorphism in java, method overloading and method overriding
Polymorphism in java,  method overloading and method overridingPolymorphism in java,  method overloading and method overriding
Polymorphism in java, method overloading and method overridingJavaTportal
 
Software Engineering - Spiral Model
Software Engineering - Spiral ModelSoftware Engineering - Spiral Model
Software Engineering - Spiral ModelBenedictArpon
 
Compiler Design - Ambiguous grammar, LMD & RMD, Infix & Postfix, Implementati...
Compiler Design - Ambiguous grammar, LMD & RMD, Infix & Postfix, Implementati...Compiler Design - Ambiguous grammar, LMD & RMD, Infix & Postfix, Implementati...
Compiler Design - Ambiguous grammar, LMD & RMD, Infix & Postfix, Implementati...Saikrishna Tanguturu
 
Algorithms and flowcharts
Algorithms and flowchartsAlgorithms and flowcharts
Algorithms and flowchartsSajib
 

What's hot (20)

unit testing and debugging
unit testing and debuggingunit testing and debugging
unit testing and debugging
 
Algorithm Development
Algorithm DevelopmentAlgorithm Development
Algorithm Development
 
Spiral model
Spiral modelSpiral model
Spiral model
 
PROTOTYPE MODEL
PROTOTYPE MODELPROTOTYPE MODEL
PROTOTYPE MODEL
 
loaders and linkers
 loaders and linkers loaders and linkers
loaders and linkers
 
Class or Object
Class or ObjectClass or Object
Class or Object
 
Basic concept of OOP's
Basic concept of OOP'sBasic concept of OOP's
Basic concept of OOP's
 
Software engineering model
Software engineering modelSoftware engineering model
Software engineering model
 
multi threading
multi threadingmulti threading
multi threading
 
Chapter 02: Classes Objects and Methods Java by Tushar B Kute
Chapter 02: Classes Objects and Methods Java by Tushar B KuteChapter 02: Classes Objects and Methods Java by Tushar B Kute
Chapter 02: Classes Objects and Methods Java by Tushar B Kute
 
COCOMO model
COCOMO modelCOCOMO model
COCOMO model
 
Rad model
Rad modelRad model
Rad model
 
Three address code In Compiler Design
Three address code In Compiler DesignThree address code In Compiler Design
Three address code In Compiler Design
 
Cocomo model
Cocomo modelCocomo model
Cocomo model
 
C by balaguruswami - e.balagurusamy
C   by balaguruswami - e.balagurusamyC   by balaguruswami - e.balagurusamy
C by balaguruswami - e.balagurusamy
 
Designing Techniques in Software Engineering
Designing Techniques in Software EngineeringDesigning Techniques in Software Engineering
Designing Techniques in Software Engineering
 
Polymorphism in java, method overloading and method overriding
Polymorphism in java,  method overloading and method overridingPolymorphism in java,  method overloading and method overriding
Polymorphism in java, method overloading and method overriding
 
Software Engineering - Spiral Model
Software Engineering - Spiral ModelSoftware Engineering - Spiral Model
Software Engineering - Spiral Model
 
Compiler Design - Ambiguous grammar, LMD & RMD, Infix & Postfix, Implementati...
Compiler Design - Ambiguous grammar, LMD & RMD, Infix & Postfix, Implementati...Compiler Design - Ambiguous grammar, LMD & RMD, Infix & Postfix, Implementati...
Compiler Design - Ambiguous grammar, LMD & RMD, Infix & Postfix, Implementati...
 
Algorithms and flowcharts
Algorithms and flowchartsAlgorithms and flowcharts
Algorithms and flowcharts
 

Similar to Structural testing

7-White Box Testing.ppt
7-White Box Testing.ppt7-White Box Testing.ppt
7-White Box Testing.pptHirenderPal
 
White Box testing by Pankaj Thakur, NITTTR Chandigarh
White Box testing by Pankaj Thakur, NITTTR ChandigarhWhite Box testing by Pankaj Thakur, NITTTR Chandigarh
White Box testing by Pankaj Thakur, NITTTR ChandigarhPankaj Thakur
 
A WHITE BOX TESTING TECHNIQUE IN SOFTWARE TESTING : BASIS PATH TESTING
A WHITE BOX TESTING TECHNIQUE IN SOFTWARE TESTING : BASIS PATH TESTINGA WHITE BOX TESTING TECHNIQUE IN SOFTWARE TESTING : BASIS PATH TESTING
A WHITE BOX TESTING TECHNIQUE IN SOFTWARE TESTING : BASIS PATH TESTINGJournal For Research
 
A Comparative Analysis of Slicing for Structured Programs
A Comparative Analysis of Slicing for Structured ProgramsA Comparative Analysis of Slicing for Structured Programs
A Comparative Analysis of Slicing for Structured ProgramsEditor IJCATR
 
Reverse Engineering automation
Reverse Engineering automationReverse Engineering automation
Reverse Engineering automationPositive Hack Days
 
Path testing, data flow testing
Path testing, data flow testingPath testing, data flow testing
Path testing, data flow testingpriyasoundar
 
Unit 3 Control Flow Testing
Unit 3   Control Flow TestingUnit 3   Control Flow Testing
Unit 3 Control Flow Testingravikhimani
 
How to calculte Cyclomatic Complexity through various methods
How to calculte Cyclomatic Complexity through various methodsHow to calculte Cyclomatic Complexity through various methods
How to calculte Cyclomatic Complexity through various methodsharsimratDeo
 
1414_lecturueueueueuueueeueueueuusuee_7.ppt
1414_lecturueueueueuueueeueueueuusuee_7.ppt1414_lecturueueueueuueueeueueueuusuee_7.ppt
1414_lecturueueueueuueueeueueueuusuee_7.pptabdulbasetalselwi
 
Program slicing
Program slicing Program slicing
Program slicing Feras Tanan
 
Qat09 presentations dxw07u
Qat09 presentations dxw07uQat09 presentations dxw07u
Qat09 presentations dxw07uShubham Sharma
 
Algorithms and flowcharts
Algorithms and flowchartsAlgorithms and flowcharts
Algorithms and flowchartsSamuel Igbanogu
 
Calculation of Cyclomatic complexity
Calculation of Cyclomatic complexityCalculation of Cyclomatic complexity
Calculation of Cyclomatic complexitynikshaikh786
 
Static Analysis of Computer programs
Static Analysis of Computer programs Static Analysis of Computer programs
Static Analysis of Computer programs Arvind Devaraj
 
White Box Testing And Control Flow & Loop Testing
White Box Testing And Control Flow & Loop TestingWhite Box Testing And Control Flow & Loop Testing
White Box Testing And Control Flow & Loop TestingAnkit Mulani
 
Control Flow Testing
Control Flow TestingControl Flow Testing
Control Flow TestingHirra Sultan
 

Similar to Structural testing (20)

7-White Box Testing.ppt
7-White Box Testing.ppt7-White Box Testing.ppt
7-White Box Testing.ppt
 
White Box testing by Pankaj Thakur, NITTTR Chandigarh
White Box testing by Pankaj Thakur, NITTTR ChandigarhWhite Box testing by Pankaj Thakur, NITTTR Chandigarh
White Box testing by Pankaj Thakur, NITTTR Chandigarh
 
White box testing
White box testingWhite box testing
White box testing
 
A WHITE BOX TESTING TECHNIQUE IN SOFTWARE TESTING : BASIS PATH TESTING
A WHITE BOX TESTING TECHNIQUE IN SOFTWARE TESTING : BASIS PATH TESTINGA WHITE BOX TESTING TECHNIQUE IN SOFTWARE TESTING : BASIS PATH TESTING
A WHITE BOX TESTING TECHNIQUE IN SOFTWARE TESTING : BASIS PATH TESTING
 
A Comparative Analysis of Slicing for Structured Programs
A Comparative Analysis of Slicing for Structured ProgramsA Comparative Analysis of Slicing for Structured Programs
A Comparative Analysis of Slicing for Structured Programs
 
Reverse Engineering automation
Reverse Engineering automationReverse Engineering automation
Reverse Engineering automation
 
Path testing, data flow testing
Path testing, data flow testingPath testing, data flow testing
Path testing, data flow testing
 
Unit 3 Control Flow Testing
Unit 3   Control Flow TestingUnit 3   Control Flow Testing
Unit 3 Control Flow Testing
 
How to calculte Cyclomatic Complexity through various methods
How to calculte Cyclomatic Complexity through various methodsHow to calculte Cyclomatic Complexity through various methods
How to calculte Cyclomatic Complexity through various methods
 
Krml203
Krml203Krml203
Krml203
 
1414_lecturueueueueuueueeueueueuusuee_7.ppt
1414_lecturueueueueuueueeueueueuusuee_7.ppt1414_lecturueueueueuueueeueueueuusuee_7.ppt
1414_lecturueueueueuueueeueueueuusuee_7.ppt
 
Program slicing
Program slicing Program slicing
Program slicing
 
Qat09 presentations dxw07u
Qat09 presentations dxw07uQat09 presentations dxw07u
Qat09 presentations dxw07u
 
Algorithms and flowcharts
Algorithms and flowchartsAlgorithms and flowcharts
Algorithms and flowcharts
 
St 1.6
St 1.6St 1.6
St 1.6
 
Calculation of Cyclomatic complexity
Calculation of Cyclomatic complexityCalculation of Cyclomatic complexity
Calculation of Cyclomatic complexity
 
LMmanual.pdf
LMmanual.pdfLMmanual.pdf
LMmanual.pdf
 
Static Analysis of Computer programs
Static Analysis of Computer programs Static Analysis of Computer programs
Static Analysis of Computer programs
 
White Box Testing And Control Flow & Loop Testing
White Box Testing And Control Flow & Loop TestingWhite Box Testing And Control Flow & Loop Testing
White Box Testing And Control Flow & Loop Testing
 
Control Flow Testing
Control Flow TestingControl Flow Testing
Control Flow Testing
 

Recently uploaded

Physiochemical properties of nanomaterials and its nanotoxicity.pptx
Physiochemical properties of nanomaterials and its nanotoxicity.pptxPhysiochemical properties of nanomaterials and its nanotoxicity.pptx
Physiochemical properties of nanomaterials and its nanotoxicity.pptxAArockiyaNisha
 
Green chemistry and Sustainable development.pptx
Green chemistry  and Sustainable development.pptxGreen chemistry  and Sustainable development.pptx
Green chemistry and Sustainable development.pptxRajatChauhan518211
 
Pests of cotton_Sucking_Pests_Dr.UPR.pdf
Pests of cotton_Sucking_Pests_Dr.UPR.pdfPests of cotton_Sucking_Pests_Dr.UPR.pdf
Pests of cotton_Sucking_Pests_Dr.UPR.pdfPirithiRaju
 
Pests of cotton_Borer_Pests_Binomics_Dr.UPR.pdf
Pests of cotton_Borer_Pests_Binomics_Dr.UPR.pdfPests of cotton_Borer_Pests_Binomics_Dr.UPR.pdf
Pests of cotton_Borer_Pests_Binomics_Dr.UPR.pdfPirithiRaju
 
VIRUSES structure and classification ppt by Dr.Prince C P
VIRUSES structure and classification ppt by Dr.Prince C PVIRUSES structure and classification ppt by Dr.Prince C P
VIRUSES structure and classification ppt by Dr.Prince C PPRINCE C P
 
Chemistry 4th semester series (krishna).pdf
Chemistry 4th semester series (krishna).pdfChemistry 4th semester series (krishna).pdf
Chemistry 4th semester series (krishna).pdfSumit Kumar yadav
 
Nanoparticles synthesis and characterization​ ​
Nanoparticles synthesis and characterization​  ​Nanoparticles synthesis and characterization​  ​
Nanoparticles synthesis and characterization​ ​kaibalyasahoo82800
 
Forensic Biology & Its biological significance.pdf
Forensic Biology & Its biological significance.pdfForensic Biology & Its biological significance.pdf
Forensic Biology & Its biological significance.pdfrohankumarsinghrore1
 
Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...
Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...
Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...Sérgio Sacani
 
Spermiogenesis or Spermateleosis or metamorphosis of spermatid
Spermiogenesis or Spermateleosis or metamorphosis of spermatidSpermiogenesis or Spermateleosis or metamorphosis of spermatid
Spermiogenesis or Spermateleosis or metamorphosis of spermatidSarthak Sekhar Mondal
 
Disentangling the origin of chemical differences using GHOST
Disentangling the origin of chemical differences using GHOSTDisentangling the origin of chemical differences using GHOST
Disentangling the origin of chemical differences using GHOSTSérgio Sacani
 
GBSN - Microbiology (Unit 1)
GBSN - Microbiology (Unit 1)GBSN - Microbiology (Unit 1)
GBSN - Microbiology (Unit 1)Areesha Ahmad
 
Lucknow 💋 Russian Call Girls Lucknow Finest Escorts Service 8923113531 Availa...
Lucknow 💋 Russian Call Girls Lucknow Finest Escorts Service 8923113531 Availa...Lucknow 💋 Russian Call Girls Lucknow Finest Escorts Service 8923113531 Availa...
Lucknow 💋 Russian Call Girls Lucknow Finest Escorts Service 8923113531 Availa...anilsa9823
 
GBSN - Biochemistry (Unit 1)
GBSN - Biochemistry (Unit 1)GBSN - Biochemistry (Unit 1)
GBSN - Biochemistry (Unit 1)Areesha Ahmad
 
❤Jammu Kashmir Call Girls 8617697112 Personal Whatsapp Number 💦✅.
❤Jammu Kashmir Call Girls 8617697112 Personal Whatsapp Number 💦✅.❤Jammu Kashmir Call Girls 8617697112 Personal Whatsapp Number 💦✅.
❤Jammu Kashmir Call Girls 8617697112 Personal Whatsapp Number 💦✅.Nitya salvi
 
Botany 4th semester series (krishna).pdf
Botany 4th semester series (krishna).pdfBotany 4th semester series (krishna).pdf
Botany 4th semester series (krishna).pdfSumit Kumar yadav
 
Recombinant DNA technology (Immunological screening)
Recombinant DNA technology (Immunological screening)Recombinant DNA technology (Immunological screening)
Recombinant DNA technology (Immunological screening)PraveenaKalaiselvan1
 
Isotopic evidence of long-lived volcanism on Io
Isotopic evidence of long-lived volcanism on IoIsotopic evidence of long-lived volcanism on Io
Isotopic evidence of long-lived volcanism on IoSérgio Sacani
 
Hire 💕 9907093804 Hooghly Call Girls Service Call Girls Agency
Hire 💕 9907093804 Hooghly Call Girls Service Call Girls AgencyHire 💕 9907093804 Hooghly Call Girls Service Call Girls Agency
Hire 💕 9907093804 Hooghly Call Girls Service Call Girls AgencySheetal Arora
 

Recently uploaded (20)

Physiochemical properties of nanomaterials and its nanotoxicity.pptx
Physiochemical properties of nanomaterials and its nanotoxicity.pptxPhysiochemical properties of nanomaterials and its nanotoxicity.pptx
Physiochemical properties of nanomaterials and its nanotoxicity.pptx
 
Green chemistry and Sustainable development.pptx
Green chemistry  and Sustainable development.pptxGreen chemistry  and Sustainable development.pptx
Green chemistry and Sustainable development.pptx
 
Pests of cotton_Sucking_Pests_Dr.UPR.pdf
Pests of cotton_Sucking_Pests_Dr.UPR.pdfPests of cotton_Sucking_Pests_Dr.UPR.pdf
Pests of cotton_Sucking_Pests_Dr.UPR.pdf
 
Pests of cotton_Borer_Pests_Binomics_Dr.UPR.pdf
Pests of cotton_Borer_Pests_Binomics_Dr.UPR.pdfPests of cotton_Borer_Pests_Binomics_Dr.UPR.pdf
Pests of cotton_Borer_Pests_Binomics_Dr.UPR.pdf
 
VIRUSES structure and classification ppt by Dr.Prince C P
VIRUSES structure and classification ppt by Dr.Prince C PVIRUSES structure and classification ppt by Dr.Prince C P
VIRUSES structure and classification ppt by Dr.Prince C P
 
Chemistry 4th semester series (krishna).pdf
Chemistry 4th semester series (krishna).pdfChemistry 4th semester series (krishna).pdf
Chemistry 4th semester series (krishna).pdf
 
Nanoparticles synthesis and characterization​ ​
Nanoparticles synthesis and characterization​  ​Nanoparticles synthesis and characterization​  ​
Nanoparticles synthesis and characterization​ ​
 
The Philosophy of Science
The Philosophy of ScienceThe Philosophy of Science
The Philosophy of Science
 
Forensic Biology & Its biological significance.pdf
Forensic Biology & Its biological significance.pdfForensic Biology & Its biological significance.pdf
Forensic Biology & Its biological significance.pdf
 
Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...
Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...
Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...
 
Spermiogenesis or Spermateleosis or metamorphosis of spermatid
Spermiogenesis or Spermateleosis or metamorphosis of spermatidSpermiogenesis or Spermateleosis or metamorphosis of spermatid
Spermiogenesis or Spermateleosis or metamorphosis of spermatid
 
Disentangling the origin of chemical differences using GHOST
Disentangling the origin of chemical differences using GHOSTDisentangling the origin of chemical differences using GHOST
Disentangling the origin of chemical differences using GHOST
 
GBSN - Microbiology (Unit 1)
GBSN - Microbiology (Unit 1)GBSN - Microbiology (Unit 1)
GBSN - Microbiology (Unit 1)
 
Lucknow 💋 Russian Call Girls Lucknow Finest Escorts Service 8923113531 Availa...
Lucknow 💋 Russian Call Girls Lucknow Finest Escorts Service 8923113531 Availa...Lucknow 💋 Russian Call Girls Lucknow Finest Escorts Service 8923113531 Availa...
Lucknow 💋 Russian Call Girls Lucknow Finest Escorts Service 8923113531 Availa...
 
GBSN - Biochemistry (Unit 1)
GBSN - Biochemistry (Unit 1)GBSN - Biochemistry (Unit 1)
GBSN - Biochemistry (Unit 1)
 
❤Jammu Kashmir Call Girls 8617697112 Personal Whatsapp Number 💦✅.
❤Jammu Kashmir Call Girls 8617697112 Personal Whatsapp Number 💦✅.❤Jammu Kashmir Call Girls 8617697112 Personal Whatsapp Number 💦✅.
❤Jammu Kashmir Call Girls 8617697112 Personal Whatsapp Number 💦✅.
 
Botany 4th semester series (krishna).pdf
Botany 4th semester series (krishna).pdfBotany 4th semester series (krishna).pdf
Botany 4th semester series (krishna).pdf
 
Recombinant DNA technology (Immunological screening)
Recombinant DNA technology (Immunological screening)Recombinant DNA technology (Immunological screening)
Recombinant DNA technology (Immunological screening)
 
Isotopic evidence of long-lived volcanism on Io
Isotopic evidence of long-lived volcanism on IoIsotopic evidence of long-lived volcanism on Io
Isotopic evidence of long-lived volcanism on Io
 
Hire 💕 9907093804 Hooghly Call Girls Service Call Girls Agency
Hire 💕 9907093804 Hooghly Call Girls Service Call Girls AgencyHire 💕 9907093804 Hooghly Call Girls Service Call Girls Agency
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.
  • 9.
  • 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
  • 15.
  • 16.
  • 17.  Path 1 : 1,6.  Path 2 :1,2,3,5.  Path 3 :1,2,4,5.  Path 4 :1,2,3,5,1.  Path 5 :1,2,4,5,1.
  • 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.
  • 19.
  • 21. a d b c 1 2 3 4
  • 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