Copyright McCabe

download Copyright McCabe

of 81

  • date post

  • Category


  • view

  • download


Embed Size (px)

Transcript of Copyright McCabe

  • 1. Management Overview 9861 Broken Land Parkway Fourth Floor Columbia, Maryland 21046 800-638-6316 [email_address] 1-800-634-0150

2. Agenda

  • McCabe IQ Overview
  • Software Measurement Issues
  • McCabe Concepts
  • Software Quality Metrics
  • Software Testing
  • Questions and Answers

3. About McCabe & Associates 20 Years of Expertise GlobalPresence Analyzed Over 25 BillionLines of Code 4. McCabe IQ process flow Analysis platform Target platform Source code Compile and run Execution log Effective Testing Quality Management Instrumented source code McCabe IQ 5. McCabe IQ and Configuration Management

  • Merant PVCS
  • Rational ClearCase
  • CA Endevor

McCabe IQ Execution Log Test Environment Effective Testing Quality Management

  • Monitor quality as software changes
  • Manage test environment

6. McCabe IQ and Test Automation McCabe IQ

  • Mercury Interactive:
  • TestDirector
  • WinRunner

Source code Test executable Execution log Risk Management Test Management GUI Test Automation Effective Testing

  • Risk-driven test management
  • Effective, automated testing

Non-GUI Test Automation 7. McCabe IQ Components McCabe IQ Framework ( metrics, data, visualization, testing, API ) TESTING McCabe Test McCabe TestCompress McCabe Slice McCabe ReTest QUALITY ASSURANCE McCabe QA McCabe Data McCabe Compare McCabe Change Source Code Parsing Technology (C, C++, Java, Visual Basic, COBOL, Fortran, Ada) 8. McCabe QA

  • McCabe QA measures software quality with industry-standard metrics
    • Manage technical risk factors as software is developed and changed
    • Improve software quality using detailed reports and visualization
    • Shorten the time between releases
    • Develop contingencyplans to addressunavoidable risks

9. McCabe Data

  • McCabe Data pinpoints the impact of data variable modifications
    • Identify usage of key data elements and data types
    • Relate data variable changes to impacted logic
    • Focus testing resources on the usage of selected data

10. McCabe Compare

  • McCabe Compare identifies reusable and redundant code
    • Simplify maintenance and re-engineering of applications through the consolidation of similar code modules
    • Search for software defects in similar code modules, to make sure theyre fixed consistently throughout the software

11. McCabe Change

  • McCabe Change identifies new and changed modules
    • Manage change with more precision than the file-level information from CM tools
    • Work with a complete technical risk profile
      • Complex?
      • Poorly tested?
      • New or changed?
    • Focus review and test efforts

12. McCabe Test

  • McCabe test maximizes testing effectiveness
    • Focus testing on high-risk areas
    • Objectively measure testing effectiveness
    • Increase the failure detection rate during internal testing
    • Assess the time and resources needed to ensure a well-tested application
    • Know when to stop testing

13. McCabe Slice

  • McCabe Slice traces functionality to implementation
    • Identifies code that implements specific functional transactions
    • Isolates code that is unique to the implementation of specific functional transactions
    • Helps extract business rules for application redesign

14. McCabe IQ Components Summary

  • McCabe QA : Improve quality with metrics
  • McCabe Data : Analyze data impact
  • McCabe Compare : Eliminate duplicate code
  • McCabe Change : Focus on changed software
  • McCabe Test : Increase test effectiveness
  • McCabe TestCompress : Increase test efficiency
  • McCabe Slice : Trace functionality to code
  • McCabe ReTest : Automate regression testing

15. Software Measurement Issues

  • Risk management
  • Software metrics
  • Complexity metrics
  • Complexity metric evaluation
  • Benefits of complexity measurement

16. Software Risk Management

  • Software risk falls into two major categories
    • Non-technical risk: how important is the system?
      • Usually known early
    • Technical risk: how likely is the system to fail?
      • Often known too late
  • Complexity analysis quantifies technical risk
    • Helps quantify reliability and maintainability
      • This helps with prioritization, resource allocation, contingency planning, etc.
    • Guides testing
      • Focuses effort to mitigate greatest risks
      • Helps deploy testing resources efficiently

17. Software Metrics Overview

  • Metrics are quantitative measures
    • Operational: cost, failure rate, change effort,
    • Intrinsic: size, complexity,
  • Most operational metrics are known too late
    • Cost, failure rate are only known after deployment
    • So, they arent suitable for risk management
  • Complexity metrics are available immediately
    • Complexity is calculated from source code
  • Complexity predicts operational metrics
    • Complexity correlates with defects, maintenance costs, ...

18. Complexity Metric Evaluation

  • Good complexity metrics have three properties
    • Descriptive: objectively measure something
    • Predictive: correlate with something interesting
    • Prescriptive: guide risk reduction
  • Consider lines of code
    • Descriptive: yes, measures software size
    • Predictive, Prescriptive: no
  • Consider cyclomatic complexity
    • Descriptive: yes, measures decision logic
    • Predictive: yes, predicts errors and maintenance
    • Prescriptive: yes, guides testing and improvement

19. Benefits of Complexity Measurement

  • Complexity metrics are available from code
    • They can even be estimated from a design
  • They provide continuous feedback
    • They can identify high-risk software as soon as it is written or changed
  • They pinpoint areas of potential instability
    • They can focus resources for reviews, testing, and code improvement
  • They help predict eventual operational metrics
    • Systems with similar complexity metric profiles tend to have similar test effort, cost, error frequency, ...

20. McCabe Concepts

  • Definition: In C and C++, a module is a function or subroutine with a single entry point and a single exit point. A module is represented by a rectangular box on the Battlemap.

main function a function c function d printf Difficult to maintainable module Difficult to test module Well-designed, testable module Library module 21. Analyzing a Module

  • For each module, an annotated source listing and flowgraph is generated.
  • Flowgraph- an architectural diagram of a software modules logic.

1 main() 2 { 3 printf(example); 4 if (y > 10) 5 b(); 6 else 7 c(); 8 printf(end); 9 } StmtCode Number mainFlowgraph node :statement or block of sequential statements condition end of condition edge : flow of control between nodes 1-3 4 5 7 8-9 Battlemap main b c printf 22. Flowgraph Notation (C) if (i) ; if (i) ; else ; if (i || j) ; do ; while (i); while (i) ; switch(i) { case 0: break; ... } if (i && j) ; 23. Flowgraph and Its Annotated Source Listing 0 1* 2 3 4* 5 6* 7 8 9 Origin information Node correspondence Metric information Decision construct 24. Low Complexity Software

  • Reliable
    • Simple logic