test coverage metrics
play

Test Coverage Metrics Craig A. Damon March 10, 1997 Papers: - PDF document

Test Coverage Metrics Craig A. Damon March 10, 1997 Papers: Howden, W. E, Reliability of the path analysis testing strategy, IEEE Transactions on Software Engineering , vol 2, no 3 (Sept 1976),pp 28-215. Budd, T. A. Mutation Analysis: Ideas,


  1. Test Coverage Metrics Craig A. Damon March 10, 1997 Papers: Howden, W. E, Reliability of the path analysis testing strategy, IEEE Transactions on Software Engineering , vol 2, no 3 (Sept 1976),pp 28-215. Budd, T. A. Mutation Analysis: Ideas, Examples, Problems and Prospects in Computer Program Testing ed. B. Chandrasekaran and S. Radicchi. North Holland Publishing, Amsterdam, 1981. Frankl, P.G. and Weyuker, E. J., An Applicable Family of Data Flow Testing Criteria, IEEE Transactions on Software Engineering , vol 14, no 10 (October 1988), pp 1483-1498.

  2. Basic Question How Reliable Is A “Tested” Program? Will A Test Suite Find All or Even Most Bugs? Want a Metric (Criteria) To Say How Thoroughly A Test Suite Tests A Program

  3. Background A Complete Test Suite Containing Every Possible Input Would Be Guaranteed To Find Every Bug This Is Clearly Almost Always Too Expensive, And Frequently Infinite An Ideal Test Suite For A Given Program Would Contain One Test For Each Actual Bug, But ... Bugs Aren’t Known So We Want A Test For Each Possible Bug

  4. Basic Definitions Goal Is A Way To Check Whether Every Possible Bug Of The Program Is Covered By Some Test In The Finite Test Suite Called “Reliable” Test Suite If Guaranteed Called “Almost Reliable” If Some Possible Bugs Are Only Very Likely To Be Covered Criteria Is A Method For Checking Whether A Test Suite Is (Approximately) Reliable A Criteria Which Can Be Satisfied For Every Program Is Called “Applicable”

  5. Statement / Block Coverage Criteria Is Every Statement Executed By Some Test? Block Coverage Is Effectively The Same, But More Efficient Very Easy To Implement And Understand Not Reliable: Obvious Missing Paths (Loops, Else-less Ifs) No Consideration Of Context Not Applicable: “Dead” Code Error Handling Code

  6. Branch Coverage Criteria Is Every Possible Decision Made At Every Branch? Relatively Easy To Implement And Understand Adds Obvious Missing Paths From Statement Coverage Not Reliable: No Consideration Of Context Not Applicable: “Dead” or Error Code

  7. Path Coverage Criteria Is Every Possible Path Executed By Some Test? Infinite Number Of Paths If Any Loops Various Reduction Techniques Most Common Is Path Fragment Coverage, Where Every Possible Path Is A Combination of Some Sequence of Path Fragments Not Reliable: Any Reduction May Remove Key Combination Not Applicable: Infeasible Paths

  8. Mutation Coverage Is Every Possible Variation Of The Program Tested? Possibly Huge Numbers Of Mutations Can Show Other Interesting (Mis-)Features Of Code Not Reliable: Non-Local Combinations Missing Mutation Combinations Way Off Errors Missing Cases Not Applicable: “Dead” Code

  9. Data Flow Coverage Criteria Is Every Possible Usage Of Every Possible Definition Tested? Feasible Only For Local Data Flow Can Use Approximations At Expense Of Some Reliability Really A Kind Of Path Coverage Reduction Technique Not Reliable: Non-Local Def/Use Pairs Combinations of Usages Not Applicable: Infeasible Paths

  10. Currently Available Tools Some Commercial Offer Only Statement/Block Coverage Better Tools Give Branch Coverage A Few Give Some Form Of Path Coverage One Commercial Tools (LDRA) Claims To Provide Some Unspecified DF Coverage GCT Does Some Mutation Testing As Well As Statement And Branch atac Does Basic Data Flow Coverage As Well As Statement And Branch

  11. Big Issues Which Criteria To Choose Which Covers More Is Current Hot Topic How Much Of Test Suite Can Be Generated? Not Everything Heuristics vs Well Founded Higher Density Of Bugs In Heuristics Thoroughness vs. Cost Misleading Numbers in Coverage Other Types Of Programs Event Oriented Object Oriented Data Structure Oriented Black Box vs White Box Testing Missing Functionality Other Types Of Problems

  12. Performance Usability

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend