SlideShare a Scribd company logo
 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

Learn C
Learn CLearn C
Learn C
kantila
 
C Programming Unit-2
C Programming Unit-2C Programming Unit-2
C Programming Unit-2
Vikram Nandini
 
C programming session5
C programming  session5C programming  session5
C programming session5
Keroles karam khalil
 
CP Handout#1
CP Handout#1CP Handout#1
CP Handout#1
trupti1976
 
Flowcharting
FlowchartingFlowcharting
Flowcharting
wlasoi lasoi
 
Basic structure of c programming
Basic structure of c programmingBasic structure of c programming
Basic structure of c programming
TejaswiB4
 
Programming in C Presentation upto FILE
Programming in C Presentation upto FILEProgramming in C Presentation upto FILE
Programming in C Presentation upto FILE
Dipta Saha
 
C++ rajan
C++ rajanC++ rajan
C++ rajan
Deep Rajan
 
User_Defined_Functions_ppt_slideshare.
User_Defined_Functions_ppt_slideshare.User_Defined_Functions_ppt_slideshare.
User_Defined_Functions_ppt_slideshare.
NabeelaNousheen
 
structure of a c program
structure of a c programstructure of a c program
structure of a c program
sruthi yandapalli
 
Staroletov Design by Contract, verification of Cyber-physical systems
Staroletov Design by Contract, verification of Cyber-physical systemsStaroletov Design by Contract, verification of Cyber-physical systems
Staroletov Design by Contract, verification of Cyber-physical systems
Sergey Staroletov
 
C language for Semester Exams for Engineers
C language for Semester Exams for Engineers C language for Semester Exams for Engineers
C language for Semester Exams for Engineers
Appili Vamsi Krishna
 
Overview of C Mrs Sowmya Jyothi
Overview of C Mrs Sowmya JyothiOverview of C Mrs Sowmya Jyothi
Overview of C Mrs Sowmya Jyothi
Sowmya Jyothi
 
FUNCTION IN C PROGRAMMING UNIT -6 (BCA I SEM)
 FUNCTION IN C PROGRAMMING UNIT -6 (BCA I SEM) FUNCTION IN C PROGRAMMING UNIT -6 (BCA I SEM)
FUNCTION IN C PROGRAMMING UNIT -6 (BCA I SEM)
Mansi Tyagi
 
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
Journal For Research
 
Principle source of optimazation
Principle source of optimazationPrinciple source of optimazation
Principle source of optimazation
Siva Sathya
 

What's hot (19)

Learn C
Learn CLearn C
Learn C
 
C Programming Unit-2
C Programming Unit-2C Programming Unit-2
C Programming Unit-2
 
Structure of a C program
Structure of a C programStructure of a C program
Structure of a C program
 
C programming session5
C programming  session5C programming  session5
C programming session5
 
CP Handout#1
CP Handout#1CP Handout#1
CP Handout#1
 
Flowcharting
FlowchartingFlowcharting
Flowcharting
 
Basic structure of c programming
Basic structure of c programmingBasic structure of c programming
Basic structure of c programming
 
Programming in C Presentation upto FILE
Programming in C Presentation upto FILEProgramming in C Presentation upto FILE
Programming in C Presentation upto FILE
 
C++ rajan
C++ rajanC++ rajan
C++ rajan
 
Ch4 functions
Ch4 functionsCh4 functions
Ch4 functions
 
User_Defined_Functions_ppt_slideshare.
User_Defined_Functions_ppt_slideshare.User_Defined_Functions_ppt_slideshare.
User_Defined_Functions_ppt_slideshare.
 
structure of a c program
structure of a c programstructure of a c program
structure of a c program
 
Staroletov Design by Contract, verification of Cyber-physical systems
Staroletov Design by Contract, verification of Cyber-physical systemsStaroletov Design by Contract, verification of Cyber-physical systems
Staroletov Design by Contract, verification of Cyber-physical systems
 
Krml203
Krml203Krml203
Krml203
 
C language for Semester Exams for Engineers
C language for Semester Exams for Engineers C language for Semester Exams for Engineers
C language for Semester Exams for Engineers
 
Overview of C Mrs Sowmya Jyothi
Overview of C Mrs Sowmya JyothiOverview of C Mrs Sowmya Jyothi
Overview of C Mrs Sowmya Jyothi
 
FUNCTION IN C PROGRAMMING UNIT -6 (BCA I SEM)
 FUNCTION IN C PROGRAMMING UNIT -6 (BCA I SEM) FUNCTION IN C PROGRAMMING UNIT -6 (BCA I SEM)
FUNCTION IN C PROGRAMMING UNIT -6 (BCA I SEM)
 
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
 
Principle source of optimazation
Principle source of optimazationPrinciple source of optimazation
Principle source of optimazation
 

Similar to Structural testing

7-White Box Testing.ppt
7-White Box Testing.ppt7-White Box Testing.ppt
7-White Box Testing.ppt
HirenderPal
 
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
Pankaj Thakur
 
White box testing
White box testingWhite box testing
White box testing
Purvi Sankhe
 
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
Editor 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 testing
priyasoundar
 
Unit 3 Control Flow Testing
Unit 3   Control Flow TestingUnit 3   Control Flow Testing
Unit 3 Control Flow Testing
ravikhimani
 
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
harsimratDeo
 
1414_lecturueueueueuueueeueueueuusuee_7.ppt
1414_lecturueueueueuueueeueueueuusuee_7.ppt1414_lecturueueueueuueueeueueueuusuee_7.ppt
1414_lecturueueueueuueueeueueueuusuee_7.ppt
abdulbasetalselwi
 
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 flowcharts
Samuel Igbanogu
 
St 1.6
St 1.6St 1.6
Calculation of Cyclomatic complexity
Calculation of Cyclomatic complexityCalculation of Cyclomatic complexity
Calculation of Cyclomatic complexity
nikshaikh786
 
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 Testing
Hirra Sultan
 
Information-Flow Analysis of Design Breaks up
Information-Flow Analysis of Design Breaks upInformation-Flow Analysis of Design Breaks up
Information-Flow Analysis of Design Breaks up
Eswar Publications
 
C programming
C programmingC programming
C programming
PralhadKhanal1
 

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 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
 
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
 
Information-Flow Analysis of Design Breaks up
Information-Flow Analysis of Design Breaks upInformation-Flow Analysis of Design Breaks up
Information-Flow Analysis of Design Breaks up
 
C programming
C programmingC programming
C programming
 

Recently uploaded

A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
Philip Schwarz
 
2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
Georgi Kodinov
 
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
XfilesPro
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
Globus
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
Globus
 
GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
Neo4j
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
Matt Welsh
 
Pro Unity Game Development with C-sharp Book
Pro Unity Game Development with C-sharp BookPro Unity Game Development with C-sharp Book
Pro Unity Game Development with C-sharp Book
abdulrafaychaudhry
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke
 
Enterprise Software Development with No Code Solutions.pptx
Enterprise Software Development with No Code Solutions.pptxEnterprise Software Development with No Code Solutions.pptx
Enterprise Software Development with No Code Solutions.pptx
QuickwayInfoSystems3
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
Globus
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
Globus
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
Globus
 
Text-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptx
Text-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptxText-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptx
Text-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptx
ShamsuddeenMuhammadA
 
Launch Your Streaming Platforms in Minutes
Launch Your Streaming Platforms in MinutesLaunch Your Streaming Platforms in Minutes
Launch Your Streaming Platforms in Minutes
Roshan Dwivedi
 
Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
Cyanic lab
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
abdulrafaychaudhry
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Globus
 

Recently uploaded (20)

A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
 
2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
 
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
 
GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
 
Pro Unity Game Development with C-sharp Book
Pro Unity Game Development with C-sharp BookPro Unity Game Development with C-sharp Book
Pro Unity Game Development with C-sharp Book
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
 
Enterprise Software Development with No Code Solutions.pptx
Enterprise Software Development with No Code Solutions.pptxEnterprise Software Development with No Code Solutions.pptx
Enterprise Software Development with No Code Solutions.pptx
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
 
Text-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptx
Text-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptxText-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptx
Text-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptx
 
Launch Your Streaming Platforms in Minutes
Launch Your Streaming Platforms in MinutesLaunch Your Streaming Platforms in Minutes
Launch Your Streaming Platforms in Minutes
 
Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
 

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