SlideShare a Scribd company logo
BASIC PATH
TESTING
HOA LE
Agenda
 Introduction
 Cyclomatic complexity
 Basic path testing approach
 Conclusion
Introduction
 A white box method
 Proposed by McCabe in 1980’s
 A hybrid of path testing and branch
testing methods.
 Based on Cyclomatic complexity and
uses control flow to establish the path
coverage criteria.
Cyclomatic Complexity
 Developed by McCabe in 1976
 Measures the number of linearly independent
paths through a program.
 The higher the number the more complex the
code.
Basic path testing approach
 Step 1: Draw a control flow graph.
 Step 2: Determine Cyclomatic complexity.
 Step 3: Find a basis set of paths.
 Step 4: Generate test cases for each path.
Draw a control flow graph
 Basic control flow graph structures:
Draw a control flow graph
Arrows or edges represent flows of
control.
Circles or nodes represent actions.
Areas bounded by edges and
nodes are called regions.
A predicate node is a node
containing a condition.
Draw a control flow graph
 1: IF A = 100
 2: THEN IF B > C
 3: THEN A = B
 4: ELSEA= C
 5: ENDIF
 6: ENDIF
 7: Print A
Determine Cyclomatic complexity
There are several methods:
1. Cyclomatic complexity = edges -
nodes + 2p
2. Cyclomatic complexity= Number of
Predicate Nodes + 1
3. Cyclomatic complexity =number of
regions in the control flow graph
Determine Cyclomatic complexity
Cyclomatic complexity = edges - nodes + 2p
 p = number of unconnected parts of the
graph.
Cyclomatic
complexity =
8-7+ 2*1= 3.
Determine Cyclomatic complexity
Cyclomatic complexity = edges - nodes
+ 2p
Cyclomatic complexity
= 7-8+ 2*2= 3.
Determine Cyclomatic complexity
Cyclomatic complexity= Number of
Predicate Nodes + 1
Cyclomatic complexity
= 2+1= 3.
Determine Cyclomatic complexity
Cyclomatic complexity =number of regions in
the control flow graph
Cyclomatic complexity
= 3
Find a basis set of paths
 Path 1: 1, 2, 3, 5, 6, 7.
 Path 2: 1, 2, 4, 5, 6, 7.
 Path 3: 1, 6, 7.
Generate test cases for each path
 We have 3 paths so we need at least one test
case to cover each path.
 Write test case for these paths .
Conclusion
 Basic path testing helps us to reduce
redundant tests.
 It suggests independent paths from which we
write test cases needed to ensure that every
statement and condition can be executed at
least one time.
References
 W. Xibo and S. Na, "Automatic test data
generation for path testing using genetic
algorithms," in Measuring Technology and
Mechatronics Automation (ICMTMA), 2011
Third International Conference on, vol. 1, pp.
596-599, IEEE, 2011..
 B. Smith and L. A. Williams, "A survey on code
coverage as a stopping criterion for unit
testing," 2008.
 E. L. Lloyd and B. A. Malloy, "A study of test
coverage adequacy in the presence of stubs,"
Journal of Object Technology, vol. 4, no. 5, pp.
117-137,2005.
Basis path testing
Ad

More Related Content

What's hot (20)

Software Measurement and Metrics.pptx
Software Measurement and Metrics.pptxSoftware Measurement and Metrics.pptx
Software Measurement and Metrics.pptx
ubaidullah75790
 
White Box Testing
White Box Testing White Box Testing
White Box Testing
MariamKhan120
 
Chapter 13 software testing strategies
Chapter 13 software testing strategiesChapter 13 software testing strategies
Chapter 13 software testing strategies
SHREEHARI WADAWADAGI
 
Cocomo model
Cocomo modelCocomo model
Cocomo model
Devan Thakur
 
Black Box Testing
Black Box TestingBlack Box Testing
Black Box Testing
Testbytes
 
Software Engineering ppt
Software Engineering pptSoftware Engineering ppt
Software Engineering ppt
shruths2890
 
Formal Languages and Automata Theory Unit 1
Formal Languages and Automata Theory Unit 1Formal Languages and Automata Theory Unit 1
Formal Languages and Automata Theory Unit 1
Srimatre K
 
Risk management(software engineering)
Risk management(software engineering)Risk management(software engineering)
Risk management(software engineering)
Priya Tomar
 
Black Box Testing
Black Box TestingBlack Box Testing
Black Box Testing
Nivetha Padmanaban
 
System testing
System testingSystem testing
System testing
KarthigaGunasekaran1
 
WORKFLOW OF THE PROCESS IN SPM
 WORKFLOW OF THE PROCESS IN SPM WORKFLOW OF THE PROCESS IN SPM
WORKFLOW OF THE PROCESS IN SPM
garishma bhatia
 
Phased life cycle model
Phased life cycle modelPhased life cycle model
Phased life cycle model
Stephennancy
 
Lect5 improving software economics
Lect5 improving software economicsLect5 improving software economics
Lect5 improving software economics
meena466141
 
Uml Common Mechanism
Uml Common MechanismUml Common Mechanism
Uml Common Mechanism
Satyamevjayte Haxor
 
Software Process Models
Software Process ModelsSoftware Process Models
Software Process Models
Hassan A-j
 
Se (techniques for black box testing ppt)
Se (techniques for black box testing ppt)Se (techniques for black box testing ppt)
Se (techniques for black box testing ppt)
Mani Kanth
 
Software testing life cycle
Software testing life cycleSoftware testing life cycle
Software testing life cycle
Garuda Trainings
 
Cocomo model
Cocomo modelCocomo model
Cocomo model
Baskarkncet
 
Formal Specification in Software Engineering SE9
Formal Specification in Software Engineering SE9Formal Specification in Software Engineering SE9
Formal Specification in Software Engineering SE9
koolkampus
 
Lecture 01 introduction to compiler
Lecture 01 introduction to compilerLecture 01 introduction to compiler
Lecture 01 introduction to compiler
Iffat Anjum
 
Software Measurement and Metrics.pptx
Software Measurement and Metrics.pptxSoftware Measurement and Metrics.pptx
Software Measurement and Metrics.pptx
ubaidullah75790
 
Chapter 13 software testing strategies
Chapter 13 software testing strategiesChapter 13 software testing strategies
Chapter 13 software testing strategies
SHREEHARI WADAWADAGI
 
Black Box Testing
Black Box TestingBlack Box Testing
Black Box Testing
Testbytes
 
Software Engineering ppt
Software Engineering pptSoftware Engineering ppt
Software Engineering ppt
shruths2890
 
Formal Languages and Automata Theory Unit 1
Formal Languages and Automata Theory Unit 1Formal Languages and Automata Theory Unit 1
Formal Languages and Automata Theory Unit 1
Srimatre K
 
Risk management(software engineering)
Risk management(software engineering)Risk management(software engineering)
Risk management(software engineering)
Priya Tomar
 
WORKFLOW OF THE PROCESS IN SPM
 WORKFLOW OF THE PROCESS IN SPM WORKFLOW OF THE PROCESS IN SPM
WORKFLOW OF THE PROCESS IN SPM
garishma bhatia
 
Phased life cycle model
Phased life cycle modelPhased life cycle model
Phased life cycle model
Stephennancy
 
Lect5 improving software economics
Lect5 improving software economicsLect5 improving software economics
Lect5 improving software economics
meena466141
 
Software Process Models
Software Process ModelsSoftware Process Models
Software Process Models
Hassan A-j
 
Se (techniques for black box testing ppt)
Se (techniques for black box testing ppt)Se (techniques for black box testing ppt)
Se (techniques for black box testing ppt)
Mani Kanth
 
Software testing life cycle
Software testing life cycleSoftware testing life cycle
Software testing life cycle
Garuda Trainings
 
Formal Specification in Software Engineering SE9
Formal Specification in Software Engineering SE9Formal Specification in Software Engineering SE9
Formal Specification in Software Engineering SE9
koolkampus
 
Lecture 01 introduction to compiler
Lecture 01 introduction to compilerLecture 01 introduction to compiler
Lecture 01 introduction to compiler
Iffat Anjum
 

Similar to Basis path testing (20)

7-White Box Testing.ppt
7-White Box Testing.ppt7-White Box Testing.ppt
7-White Box Testing.ppt
HirenderPal
 
software quality Assurance-lecture26.ppt
software quality Assurance-lecture26.pptsoftware quality Assurance-lecture26.ppt
software quality Assurance-lecture26.ppt
ZainabShahzad9
 
Mit15 082 jf10_lec01
Mit15 082 jf10_lec01Mit15 082 jf10_lec01
Mit15 082 jf10_lec01
Saad Liaqat
 
Software Engineering (Testing techniques)
Software Engineering (Testing techniques)Software Engineering (Testing techniques)
Software Engineering (Testing techniques)
ShudipPal
 
Software Engineering (Testing techniques)
Software Engineering (Testing techniques)Software Engineering (Testing techniques)
Software Engineering (Testing techniques)
ShudipPal
 
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
 
vu-sqa-lecture26 of principle of management.ppt
vu-sqa-lecture26 of principle of management.pptvu-sqa-lecture26 of principle of management.ppt
vu-sqa-lecture26 of principle of management.ppt
abpassion478
 
Software Quality Testing
Software Quality TestingSoftware Quality Testing
Software Quality Testing
Kiran Kumar
 
Paths, Path products and Regular expressions: path products & path expression...
Paths, Path products and Regular expressions: path products & path expression...Paths, Path products and Regular expressions: path products & path expression...
Paths, Path products and Regular expressions: path products & path expression...
Rajalingam Balakrishnan
 
COMPUTER NETWORKS CHAPTER 3 NETWORK LAYER NOTES CSE 3RD year sem 1
COMPUTER NETWORKS CHAPTER 3 NETWORK LAYER NOTES CSE 3RD year sem 1COMPUTER NETWORKS CHAPTER 3 NETWORK LAYER NOTES CSE 3RD year sem 1
COMPUTER NETWORKS CHAPTER 3 NETWORK LAYER NOTES CSE 3RD year sem 1
aishwaryaarrao3
 
White box testing
White box testingWhite box testing
White box testing
Purvi Sankhe
 
Network Models - modeling and simulation(lecture Three).ppt
Network Models - modeling and simulation(lecture Three).pptNetwork Models - modeling and simulation(lecture Three).ppt
Network Models - modeling and simulation(lecture Three).ppt
nansambakuluthum7
 
cyclomatic complexity.ppt_software developement
cyclomatic complexity.ppt_software developementcyclomatic complexity.ppt_software developement
cyclomatic complexity.ppt_software developement
AbAlex1
 
New software testing-techniques
New software testing-techniquesNew software testing-techniques
New software testing-techniques
Fincy V.J
 
Controlled dropout: a different dropout for improving training speed on deep ...
Controlled dropout: a different dropout for improving training speed on deep ...Controlled dropout: a different dropout for improving training speed on deep ...
Controlled dropout: a different dropout for improving training speed on deep ...
Byung Soo Ko
 
Seii unit6 software-testing-techniques
Seii unit6 software-testing-techniquesSeii unit6 software-testing-techniques
Seii unit6 software-testing-techniques
Ahmad sohail Kakar
 
IGARSS2011_ABC Optimized SOM.ppt
IGARSS2011_ABC Optimized SOM.pptIGARSS2011_ABC Optimized SOM.ppt
IGARSS2011_ABC Optimized SOM.ppt
grssieee
 
L03_Mesh and Nodal Analysis.pptxkuaewbgewb.dskBD
L03_Mesh and Nodal Analysis.pptxkuaewbgewb.dskBDL03_Mesh and Nodal Analysis.pptxkuaewbgewb.dskBD
L03_Mesh and Nodal Analysis.pptxkuaewbgewb.dskBD
indrahasasai26
 
Substation grounding grid design using Alternative Transients Program-ATP and...
Substation grounding grid design using Alternative Transients Program-ATP and...Substation grounding grid design using Alternative Transients Program-ATP and...
Substation grounding grid design using Alternative Transients Program-ATP and...
Jose Dariel Arcila
 
20130523 05 - Cyclomatic complexity
20130523 05 - Cyclomatic complexity20130523 05 - Cyclomatic complexity
20130523 05 - Cyclomatic complexity
LeClubQualiteLogicielle
 
7-White Box Testing.ppt
7-White Box Testing.ppt7-White Box Testing.ppt
7-White Box Testing.ppt
HirenderPal
 
software quality Assurance-lecture26.ppt
software quality Assurance-lecture26.pptsoftware quality Assurance-lecture26.ppt
software quality Assurance-lecture26.ppt
ZainabShahzad9
 
Mit15 082 jf10_lec01
Mit15 082 jf10_lec01Mit15 082 jf10_lec01
Mit15 082 jf10_lec01
Saad Liaqat
 
Software Engineering (Testing techniques)
Software Engineering (Testing techniques)Software Engineering (Testing techniques)
Software Engineering (Testing techniques)
ShudipPal
 
Software Engineering (Testing techniques)
Software Engineering (Testing techniques)Software Engineering (Testing techniques)
Software Engineering (Testing techniques)
ShudipPal
 
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
 
vu-sqa-lecture26 of principle of management.ppt
vu-sqa-lecture26 of principle of management.pptvu-sqa-lecture26 of principle of management.ppt
vu-sqa-lecture26 of principle of management.ppt
abpassion478
 
Software Quality Testing
Software Quality TestingSoftware Quality Testing
Software Quality Testing
Kiran Kumar
 
Paths, Path products and Regular expressions: path products & path expression...
Paths, Path products and Regular expressions: path products & path expression...Paths, Path products and Regular expressions: path products & path expression...
Paths, Path products and Regular expressions: path products & path expression...
Rajalingam Balakrishnan
 
COMPUTER NETWORKS CHAPTER 3 NETWORK LAYER NOTES CSE 3RD year sem 1
COMPUTER NETWORKS CHAPTER 3 NETWORK LAYER NOTES CSE 3RD year sem 1COMPUTER NETWORKS CHAPTER 3 NETWORK LAYER NOTES CSE 3RD year sem 1
COMPUTER NETWORKS CHAPTER 3 NETWORK LAYER NOTES CSE 3RD year sem 1
aishwaryaarrao3
 
Network Models - modeling and simulation(lecture Three).ppt
Network Models - modeling and simulation(lecture Three).pptNetwork Models - modeling and simulation(lecture Three).ppt
Network Models - modeling and simulation(lecture Three).ppt
nansambakuluthum7
 
cyclomatic complexity.ppt_software developement
cyclomatic complexity.ppt_software developementcyclomatic complexity.ppt_software developement
cyclomatic complexity.ppt_software developement
AbAlex1
 
New software testing-techniques
New software testing-techniquesNew software testing-techniques
New software testing-techniques
Fincy V.J
 
Controlled dropout: a different dropout for improving training speed on deep ...
Controlled dropout: a different dropout for improving training speed on deep ...Controlled dropout: a different dropout for improving training speed on deep ...
Controlled dropout: a different dropout for improving training speed on deep ...
Byung Soo Ko
 
Seii unit6 software-testing-techniques
Seii unit6 software-testing-techniquesSeii unit6 software-testing-techniques
Seii unit6 software-testing-techniques
Ahmad sohail Kakar
 
IGARSS2011_ABC Optimized SOM.ppt
IGARSS2011_ABC Optimized SOM.pptIGARSS2011_ABC Optimized SOM.ppt
IGARSS2011_ABC Optimized SOM.ppt
grssieee
 
L03_Mesh and Nodal Analysis.pptxkuaewbgewb.dskBD
L03_Mesh and Nodal Analysis.pptxkuaewbgewb.dskBDL03_Mesh and Nodal Analysis.pptxkuaewbgewb.dskBD
L03_Mesh and Nodal Analysis.pptxkuaewbgewb.dskBD
indrahasasai26
 
Substation grounding grid design using Alternative Transients Program-ATP and...
Substation grounding grid design using Alternative Transients Program-ATP and...Substation grounding grid design using Alternative Transients Program-ATP and...
Substation grounding grid design using Alternative Transients Program-ATP and...
Jose Dariel Arcila
 
Ad

Recently uploaded (20)

Automation Techniques in RPA - UiPath Certificate
Automation Techniques in RPA - UiPath CertificateAutomation Techniques in RPA - UiPath Certificate
Automation Techniques in RPA - UiPath Certificate
VICTOR MAESTRE RAMIREZ
 
Pixologic ZBrush Crack Plus Activation Key [Latest 2025] New Version
Pixologic ZBrush Crack Plus Activation Key [Latest 2025] New VersionPixologic ZBrush Crack Plus Activation Key [Latest 2025] New Version
Pixologic ZBrush Crack Plus Activation Key [Latest 2025] New Version
saimabibi60507
 
Who Watches the Watchmen (SciFiDevCon 2025)
Who Watches the Watchmen (SciFiDevCon 2025)Who Watches the Watchmen (SciFiDevCon 2025)
Who Watches the Watchmen (SciFiDevCon 2025)
Allon Mureinik
 
Explaining GitHub Actions Failures with Large Language Models Challenges, In...
Explaining GitHub Actions Failures with Large Language Models Challenges, In...Explaining GitHub Actions Failures with Large Language Models Challenges, In...
Explaining GitHub Actions Failures with Large Language Models Challenges, In...
ssuserb14185
 
Meet the Agents: How AI Is Learning to Think, Plan, and Collaborate
Meet the Agents: How AI Is Learning to Think, Plan, and CollaborateMeet the Agents: How AI Is Learning to Think, Plan, and Collaborate
Meet the Agents: How AI Is Learning to Think, Plan, and Collaborate
Maxim Salnikov
 
Exploring Wayland: A Modern Display Server for the Future
Exploring Wayland: A Modern Display Server for the FutureExploring Wayland: A Modern Display Server for the Future
Exploring Wayland: A Modern Display Server for the Future
ICS
 
Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)
Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)
Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)
Andre Hora
 
WinRAR Crack for Windows (100% Working 2025)
WinRAR Crack for Windows (100% Working 2025)WinRAR Crack for Windows (100% Working 2025)
WinRAR Crack for Windows (100% Working 2025)
sh607827
 
Adobe Illustrator Crack FREE Download 2025 Latest Version
Adobe Illustrator Crack FREE Download 2025 Latest VersionAdobe Illustrator Crack FREE Download 2025 Latest Version
Adobe Illustrator Crack FREE Download 2025 Latest Version
kashifyounis067
 
Interactive odoo dashboards for sales, CRM , Inventory, Invoice, Purchase, Pr...
Interactive odoo dashboards for sales, CRM , Inventory, Invoice, Purchase, Pr...Interactive odoo dashboards for sales, CRM , Inventory, Invoice, Purchase, Pr...
Interactive odoo dashboards for sales, CRM , Inventory, Invoice, Purchase, Pr...
AxisTechnolabs
 
Get & Download Wondershare Filmora Crack Latest [2025]
Get & Download Wondershare Filmora Crack Latest [2025]Get & Download Wondershare Filmora Crack Latest [2025]
Get & Download Wondershare Filmora Crack Latest [2025]
saniaaftab72555
 
Adobe Lightroom Classic Crack FREE Latest link 2025
Adobe Lightroom Classic Crack FREE Latest link 2025Adobe Lightroom Classic Crack FREE Latest link 2025
Adobe Lightroom Classic Crack FREE Latest link 2025
kashifyounis067
 
Not So Common Memory Leaks in Java Webinar
Not So Common Memory Leaks in Java WebinarNot So Common Memory Leaks in Java Webinar
Not So Common Memory Leaks in Java Webinar
Tier1 app
 
What Do Contribution Guidelines Say About Software Testing? (MSR 2025)
What Do Contribution Guidelines Say About Software Testing? (MSR 2025)What Do Contribution Guidelines Say About Software Testing? (MSR 2025)
What Do Contribution Guidelines Say About Software Testing? (MSR 2025)
Andre Hora
 
How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?
How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?
How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?
steaveroggers
 
Adobe After Effects Crack FREE FRESH version 2025
Adobe After Effects Crack FREE FRESH version 2025Adobe After Effects Crack FREE FRESH version 2025
Adobe After Effects Crack FREE FRESH version 2025
kashifyounis067
 
Landscape of Requirements Engineering for/by AI through Literature Review
Landscape of Requirements Engineering for/by AI through Literature ReviewLandscape of Requirements Engineering for/by AI through Literature Review
Landscape of Requirements Engineering for/by AI through Literature Review
Hironori Washizaki
 
Secure Test Infrastructure: The Backbone of Trustworthy Software Development
Secure Test Infrastructure: The Backbone of Trustworthy Software DevelopmentSecure Test Infrastructure: The Backbone of Trustworthy Software Development
Secure Test Infrastructure: The Backbone of Trustworthy Software Development
Shubham Joshi
 
Scaling GraphRAG: Efficient Knowledge Retrieval for Enterprise AI
Scaling GraphRAG:  Efficient Knowledge Retrieval for Enterprise AIScaling GraphRAG:  Efficient Knowledge Retrieval for Enterprise AI
Scaling GraphRAG: Efficient Knowledge Retrieval for Enterprise AI
danshalev
 
Douwan Crack 2025 new verson+ License code
Douwan Crack 2025 new verson+ License codeDouwan Crack 2025 new verson+ License code
Douwan Crack 2025 new verson+ License code
aneelaramzan63
 
Automation Techniques in RPA - UiPath Certificate
Automation Techniques in RPA - UiPath CertificateAutomation Techniques in RPA - UiPath Certificate
Automation Techniques in RPA - UiPath Certificate
VICTOR MAESTRE RAMIREZ
 
Pixologic ZBrush Crack Plus Activation Key [Latest 2025] New Version
Pixologic ZBrush Crack Plus Activation Key [Latest 2025] New VersionPixologic ZBrush Crack Plus Activation Key [Latest 2025] New Version
Pixologic ZBrush Crack Plus Activation Key [Latest 2025] New Version
saimabibi60507
 
Who Watches the Watchmen (SciFiDevCon 2025)
Who Watches the Watchmen (SciFiDevCon 2025)Who Watches the Watchmen (SciFiDevCon 2025)
Who Watches the Watchmen (SciFiDevCon 2025)
Allon Mureinik
 
Explaining GitHub Actions Failures with Large Language Models Challenges, In...
Explaining GitHub Actions Failures with Large Language Models Challenges, In...Explaining GitHub Actions Failures with Large Language Models Challenges, In...
Explaining GitHub Actions Failures with Large Language Models Challenges, In...
ssuserb14185
 
Meet the Agents: How AI Is Learning to Think, Plan, and Collaborate
Meet the Agents: How AI Is Learning to Think, Plan, and CollaborateMeet the Agents: How AI Is Learning to Think, Plan, and Collaborate
Meet the Agents: How AI Is Learning to Think, Plan, and Collaborate
Maxim Salnikov
 
Exploring Wayland: A Modern Display Server for the Future
Exploring Wayland: A Modern Display Server for the FutureExploring Wayland: A Modern Display Server for the Future
Exploring Wayland: A Modern Display Server for the Future
ICS
 
Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)
Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)
Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)
Andre Hora
 
WinRAR Crack for Windows (100% Working 2025)
WinRAR Crack for Windows (100% Working 2025)WinRAR Crack for Windows (100% Working 2025)
WinRAR Crack for Windows (100% Working 2025)
sh607827
 
Adobe Illustrator Crack FREE Download 2025 Latest Version
Adobe Illustrator Crack FREE Download 2025 Latest VersionAdobe Illustrator Crack FREE Download 2025 Latest Version
Adobe Illustrator Crack FREE Download 2025 Latest Version
kashifyounis067
 
Interactive odoo dashboards for sales, CRM , Inventory, Invoice, Purchase, Pr...
Interactive odoo dashboards for sales, CRM , Inventory, Invoice, Purchase, Pr...Interactive odoo dashboards for sales, CRM , Inventory, Invoice, Purchase, Pr...
Interactive odoo dashboards for sales, CRM , Inventory, Invoice, Purchase, Pr...
AxisTechnolabs
 
Get & Download Wondershare Filmora Crack Latest [2025]
Get & Download Wondershare Filmora Crack Latest [2025]Get & Download Wondershare Filmora Crack Latest [2025]
Get & Download Wondershare Filmora Crack Latest [2025]
saniaaftab72555
 
Adobe Lightroom Classic Crack FREE Latest link 2025
Adobe Lightroom Classic Crack FREE Latest link 2025Adobe Lightroom Classic Crack FREE Latest link 2025
Adobe Lightroom Classic Crack FREE Latest link 2025
kashifyounis067
 
Not So Common Memory Leaks in Java Webinar
Not So Common Memory Leaks in Java WebinarNot So Common Memory Leaks in Java Webinar
Not So Common Memory Leaks in Java Webinar
Tier1 app
 
What Do Contribution Guidelines Say About Software Testing? (MSR 2025)
What Do Contribution Guidelines Say About Software Testing? (MSR 2025)What Do Contribution Guidelines Say About Software Testing? (MSR 2025)
What Do Contribution Guidelines Say About Software Testing? (MSR 2025)
Andre Hora
 
How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?
How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?
How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?
steaveroggers
 
Adobe After Effects Crack FREE FRESH version 2025
Adobe After Effects Crack FREE FRESH version 2025Adobe After Effects Crack FREE FRESH version 2025
Adobe After Effects Crack FREE FRESH version 2025
kashifyounis067
 
Landscape of Requirements Engineering for/by AI through Literature Review
Landscape of Requirements Engineering for/by AI through Literature ReviewLandscape of Requirements Engineering for/by AI through Literature Review
Landscape of Requirements Engineering for/by AI through Literature Review
Hironori Washizaki
 
Secure Test Infrastructure: The Backbone of Trustworthy Software Development
Secure Test Infrastructure: The Backbone of Trustworthy Software DevelopmentSecure Test Infrastructure: The Backbone of Trustworthy Software Development
Secure Test Infrastructure: The Backbone of Trustworthy Software Development
Shubham Joshi
 
Scaling GraphRAG: Efficient Knowledge Retrieval for Enterprise AI
Scaling GraphRAG:  Efficient Knowledge Retrieval for Enterprise AIScaling GraphRAG:  Efficient Knowledge Retrieval for Enterprise AI
Scaling GraphRAG: Efficient Knowledge Retrieval for Enterprise AI
danshalev
 
Douwan Crack 2025 new verson+ License code
Douwan Crack 2025 new verson+ License codeDouwan Crack 2025 new verson+ License code
Douwan Crack 2025 new verson+ License code
aneelaramzan63
 
Ad

Basis path testing

  • 2. Agenda  Introduction  Cyclomatic complexity  Basic path testing approach  Conclusion
  • 3. Introduction  A white box method  Proposed by McCabe in 1980’s  A hybrid of path testing and branch testing methods.  Based on Cyclomatic complexity and uses control flow to establish the path coverage criteria.
  • 4. Cyclomatic Complexity  Developed by McCabe in 1976  Measures the number of linearly independent paths through a program.  The higher the number the more complex the code.
  • 5. Basic path testing approach  Step 1: Draw a control flow graph.  Step 2: Determine Cyclomatic complexity.  Step 3: Find a basis set of paths.  Step 4: Generate test cases for each path.
  • 6. Draw a control flow graph  Basic control flow graph structures:
  • 7. Draw a control flow graph Arrows or edges represent flows of control. Circles or nodes represent actions. Areas bounded by edges and nodes are called regions. A predicate node is a node containing a condition.
  • 8. Draw a control flow graph  1: IF A = 100  2: THEN IF B > C  3: THEN A = B  4: ELSEA= C  5: ENDIF  6: ENDIF  7: Print A
  • 9. Determine Cyclomatic complexity There are several methods: 1. Cyclomatic complexity = edges - nodes + 2p 2. Cyclomatic complexity= Number of Predicate Nodes + 1 3. Cyclomatic complexity =number of regions in the control flow graph
  • 10. Determine Cyclomatic complexity Cyclomatic complexity = edges - nodes + 2p  p = number of unconnected parts of the graph. Cyclomatic complexity = 8-7+ 2*1= 3.
  • 11. Determine Cyclomatic complexity Cyclomatic complexity = edges - nodes + 2p Cyclomatic complexity = 7-8+ 2*2= 3.
  • 12. Determine Cyclomatic complexity Cyclomatic complexity= Number of Predicate Nodes + 1 Cyclomatic complexity = 2+1= 3.
  • 13. Determine Cyclomatic complexity Cyclomatic complexity =number of regions in the control flow graph Cyclomatic complexity = 3
  • 14. Find a basis set of paths  Path 1: 1, 2, 3, 5, 6, 7.  Path 2: 1, 2, 4, 5, 6, 7.  Path 3: 1, 6, 7.
  • 15. Generate test cases for each path  We have 3 paths so we need at least one test case to cover each path.  Write test case for these paths .
  • 16. Conclusion  Basic path testing helps us to reduce redundant tests.  It suggests independent paths from which we write test cases needed to ensure that every statement and condition can be executed at least one time.
  • 17. References  W. Xibo and S. Na, "Automatic test data generation for path testing using genetic algorithms," in Measuring Technology and Mechatronics Automation (ICMTMA), 2011 Third International Conference on, vol. 1, pp. 596-599, IEEE, 2011..  B. Smith and L. A. Williams, "A survey on code coverage as a stopping criterion for unit testing," 2008.  E. L. Lloyd and B. A. Malloy, "A study of test coverage adequacy in the presence of stubs," Journal of Object Technology, vol. 4, no. 5, pp. 117-137,2005.