1 The Relationship of Cyclomatic Complexity, Essential Complexity and Error Rates Mike Chapman and Dan Solomon

Slides:



Advertisements
Similar presentations
Software Testing Techniques
Advertisements

Software Testing Technique. Introduction Software Testing is the process of executing a program or system with the intent of finding errors. It involves.
Path Analysis Why path analysis for test case design?
1 Ivan Marsic Rutgers University LECTURE 15: Software Complexity Metrics.
CYCLOMATIC COMPLEXITY 1. Invented by Thomas McCabe (1974) to measure the complexity of a program ’ s conditional logic Cyclomatic complexity of graph.
David Woo (dxw07u).  What is “White Box Testing”  Data Processing and Calculation Correctness Tests  Correctness Tests:  Path Coverage  Line Coverage.
Metrics Project and Process Metrics. Why do we measure? Assessing project status Allows us to track risks Before they go critical Adjust workflow See.
Detailed Design Kenneth M. Anderson Lecture 21
Software engineering for real-time systems
IMSE Week 18 White Box or Structural Testing Reading:Sommerville (4th edition) ch 22 orPressman (4th edition) ch 16.
CSE 300: Software Reliability Engineering Topics covered: Software metrics and software reliability Software complexity and software quality.
Chapter 18 Testing Conventional Applications
Unit Testing CS 414 – Software Engineering I Don Bagert Rose-Hulman Institute of Technology January 16, 2003.
Software Engineering Lecture 12 Software Testing Techniques 1.
1 Software Testing Techniques CIS 375 Bruce R. Maxim UM-Dearborn.
Software Metric capture notions of size and complexity.
A Complexity Measure THOMAS J. McCABE Presented by Sarochapol Rattanasopinswat.
Cyclomatic Complexity Dan Fleck Fall 2009 Dan Fleck Fall 2009.
Software Reliability Model Deterministic Models Probabilistic Models Halstead’s software metric McCabe’s cyclomatic complexity metrix Error seeding Failure.
Software Systems Verification and Validation Laboratory Assignment 3
1 IV&V Facility NASA Software IV&V Facility Metrics Data Program June 5, 2003 Mike Chapman Pat Callis.
Prof. Mohamed Batouche Software Testing.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 20 Slide 1 Defect testing l Testing programs to establish the presence of system defects.
Product Metrics An overview. What are metrics? “ A quantitative measure of the degree to which a system, component, or process possesses a given attribute.”
Agenda Introduction Overview of White-box testing Basis path testing
INTRUDUCTION TO SOFTWARE TESTING TECHNIQUES BY PRADEEP I.
White-box Testing.
1 Program Testing (Lecture 14) Prof. R. Mall Dept. of CSE, IIT, Kharagpur.
Software Metrics Cmpe 550 Fall Software Metrics.
BASIS PATH TESTING.
Creator: ACSession No: 7 Slide No: 1Reviewer: SS CSE300Advanced Software EngineeringSeptember 2005 Software Measurement – Estimation and Productivity CSE300.
Evolution in Open Source Software (OSS) SEVO seminar at Simula, 16 March 2006 Software Engineering (SU) group Reidar Conradi, Andreas Røsdal, Jingyue Li.
White Box Testing Arun Lakhotia University of Southwestern Louisiana P.O. Box Lafayette, LA 70504, USA
Theory and Practice of Software Testing
SOFTWARE TESTING. Introduction Software Testing is the process of executing a program or system with the intent of finding errors. It involves any activity.
Agent program is the one part(class)of Othello program. How many test cases do you have to test? Reversi [Othello]
Chapter 9: Path Testing Csci 565 Spring Objectives  Decision-to-decision path (DD-Paths)  Test Coverage Metrics  Basis Path Testing  Observation.
White Box Testing by : Andika Bayu H.
Cyclomatic complexity (or conditional complexity) is a software metric (measurement). Its gives the number of indepented paths through strongly connected.
Martin Hoffman Monica Hoffman. Goal To determine if a correlation exists between specified internal and dependability (external) metrics.
Cyclomatic Complexity Philippe CHARMAN Last update:
CSC 395 – Software Engineering Lecture 27: White-Box Testing.
SOFTWARE TESTING LECTURE 9. OBSERVATIONS ABOUT TESTING “ Testing is the process of executing a program with the intention of finding errors. ” – Myers.
Software Testing. SE, Testing, Hans van Vliet, © Nasty question  Suppose you are being asked to lead the team to test the software that controls.
CHAPTER 9 - PART 2 Software Testing Strategies. Lesson Outlines ■ White box testing – Data processing and calculation correctness tests – Correctness.
White Box Testing. Agenda White-box vs Black-box Program Flow Controls White-box Test Methods Exercises Complexity Q&A.
Testing Integral part of the software development process.
Software Test Metrics When you can measure what you are speaking about and express it in numbers, you know something about it; but when you cannot measure,
Static Software Metrics Tool
Chapter 17 Software Testing Techniques
BASIS PATH TESTING.
Cyclomatic Complexity
Software Engineering (CSI 321)
Data Coverage and Code Coverage
White Box Testing.
Design Metrics Software Engineering Fall 2003
Design Metrics Software Engineering Fall 2003
Cyclomatic Complexity
Cyclomatic Complexity
Software Testing (Lecture 11-a)
Cyclomatic Complexity
Chapter 14 Software Testing Techniques
Halstead software science measures and other metrics for source code
Predict Failures with Developer Networks and Social Network Analysis
Cyclomatic Complexity
Cyclomatic Complexity
Presented by Trey Brumley and Ryan Carter
Software Testing “If you can’t test it, you can’t design it”
1. Cyclomatic complexity
Unit III – Chapter 3 Path Testing.
Presentation transcript:

1 The Relationship of Cyclomatic Complexity, Essential Complexity and Error Rates Mike Chapman and Dan Solomon

2 Hypothesis Essential complexity is a better predictor of error than cyclomatic complexity.

3 Cyclomatic Complexity, or v(G), measures the number of linearly independent paths through a given program. Essential complexity is the measure of the degree to which a module contains unstructured constructs. Module design complexity, iv(G), is a measure of the module’s decision structure as it relates to calls to other modules. Complexity Definitions

4 Lines of Code McCabe finds the open bracket and starts counting until it finds the close bracket. This metric was used to show LOC error prediction in this study.

5 The Dataset 312K executable lines of C code 8 years of problem reports (life of project) 1652 Software problem reports whose fix included a change to at least one software module modules changed at least once due to a problem report 4221 total module changes as the result of problem reports 12,094 modules as identified by McCabe IQ

6 What Was Eliminated A CSCI that had recently been redesigned using C modules that no longer exist in the baseline or were ambiguous in their naming A CSCI that consisted of multiple directories of essentially the same code Leaving 11,494 modules with 3154 errors

7 Number of Modules

8 Error Rate

9 Error Prediction What does it mean to say that a metric is a good predictor of error(s)? Or that one is better than another? How does one select a threshold?

10 A Closer Look at v(G)

11 A Closer Look at ev(G)

12 Thresholds Compare the error rate among modules above a threshold with that of those below

13 Probability of Error

14 A Closer Look at v(G)

15 A Closer Look at ev(G)

16 Thresholds Compare the error probability for modules above a threshold with those below

17 Conclusions Both cyclomatic and essential complexities indicate errors Cyclomatic is a better indicator The McCabe thresholds (10 and 4) aren’t bad, but 20 and 10 look better

18 Future Work This analysis should be carried out for additional programs. We have proposed to investigate the relation between software structures and errors IV&V Facility Metrics Data Program will provide metrics and error data to the research community