© 2006 Fraunhofer CESE1 MC/DC in a nutshell Christopher Ackermann.

Slides:



Advertisements
Similar presentations
1 ECE 453 – CS 447 – SE 465 Software Testing & Quality Assurance Lecture 11 Instructor Paulo Alencar.
Advertisements

An Evaluation of MC/DC Coverage for Pair-wise Test Cases By David Anderson Software Testing Research Group (STRG)
Using the Optimizer to Generate an Effective Regression Suite: A First Step Murali M. Krishna Presented by Harumi Kuno HP.
SOFTWARE TESTING. INTRODUCTION  Software Testing is the process of executing a program or system with the intent of finding errors.  It involves any.
CS527: Advanced Topics in Software Engineering (Software Testing and Analysis) Darko Marinov September 18, 2008.
Automated Fitness Guided Fault Localization Josh Wilkerson, Ph.D. candidate Natural Computation Laboratory.
Software Testing Sudipto Ghosh CS 406 Fall 99 November 16, 1999.
Chapter 8: Path Testing Csci 565.
 2007 Pearson Education, Inc. All rights reserved C Program Control.
Testing an individual module
SOFTWARE TESTING WHITE BOX TESTING 1. GLASS BOX/WHITE BOX TESTING 2.
Software Testing and QA Theory and Practice (Chapter 4: Control Flow Testing) © Naik & Tripathy 1 Software Testing and Quality Assurance Theory and Practice.
Handouts Software Testing and Quality Assurance Theory and Practice Chapter 9 Functional Testing
1 Joe Meehean. 2 Testing is the process of executing a program with the intent of finding errors. -Glenford Myers.
Software Testing Sudipto Ghosh CS 406 Fall 99 November 9, 1999.
AMOST Experimental Comparison of Code-Based and Model-Based Test Prioritization Bogdan Korel Computer Science Department Illinois Institute of Technology.
© Andrew IrelandSoftware Design F28SD2 Software Design (F28SD2): Life-Cycle Perspective - Part 2 Andrew Ireland School of Mathematical & Computer Sciences.
Research seminar 1. Dr. S. Vilkomir, Research directions in software testing. 2. Brandi Amstutz, Combinatorial Approach to Testing Mobile Applications:
Overview of Software Testing 07/12/2013 WISTPC 2013 Peter Clarke.
© SERG Dependable Software Systems (Mutation) Dependable Software Systems Topics in Mutation Testing and Program Perturbation Material drawn from [Offutt.
Software Logic Mutation Testing Presented by Gary Kaminski.
Agenda Introduction Overview of White-box testing Basis path testing
1 Software Testing. 2 Path Testing 3 Structural Testing Also known as glass box, structural, clear box and white box testing. A software testing technique.
Chapter 22 Developer testing Peter J. Lane. Testing can be difficult for developers to follow  Testing’s goal runs counter to the goals of the other.
White-box Testing.
Coverage Estimating the quality of a test suite. 2 Code Coverage A code coverage model calls out the parts of an implementation that must be exercised.
1 Phase Testing. Janice Regan, For each group of units Overview of Implementation phase Create Class Skeletons Define Implementation Plan (+ determine.
White Box-based Coverage Testing (© 2012 Professor W. Eric Wong, The University of Texas at Dallas) 111 W. Eric Wong Department of Computer Science The.
1 Program Testing (Lecture 14) Prof. R. Mall Dept. of CSE, IIT, Kharagpur.
SOFTWARE TESTING. Introduction Software Testing is the process of executing a program or system with the intent of finding errors. It involves any activity.
Condition Testing. Condition testing is a test case design method that exercises the logical conditions contained in a program module. A simple condition.
Dynamic Testing.
Software Testing Sudipto Ghosh CS 406 Fall 99 November 23, 1999.
Structural Coverage. Measurement of structural coverage of code is a means of assessing the thoroughness of testing. Such metrics do not constitute testing.
Conditional Control Structures Chapter 5 Review. The If Statement The if statement is a conditional control structure, also called a decision structure,
Dr. Rob Hasker Dr. Brad Dennis. Coverage  Exercise: Each participant: write down 4 instructions Input to procedure: value given by someone, which person.
Dynamic White-Box Testing What is code coverage? What are the different types of code coverage? How to derive test cases from control flows?
Conditional Statements A conditional statement lets us choose which statement will be executed next Conditional statements give us the power to make basic.
A PRELIMINARY EMPIRICAL ASSESSMENT OF SIMILARITY FOR COMBINATORIAL INTERACTION TESTING OF SOFTWARE PRODUCT LINES Stefan Fischer Roberto E. Lopez-Herrejon.
Verification vs. Validation Verification: "Are we building the product right?" The software should conform to its specification.The software should conform.
Software Testing. SE, Testing, Hans van Vliet, © Nasty question  Suppose you are being asked to lead the team to test the software that controls.
Cs498dm Software Testing Darko Marinov January 24, 2012.
TQS - Teste e Qualidade de Software (Software Testing and Quality) Test Case Design: White Box Testing João Pascoal Faria.
Software TestIng White box testing.
TQS - Teste e Qualidade de Software (Software Testing and Quality) Test Case Design: White Box Testing João Pascoal Faria.
TQS - Teste e Qualidade de Software (Software Testing and Quality) Test Case Design: White Box Testing João Pascoal Faria.
Software Testing.
Control Flow Testing Handouts
Condition Testing.
Outline of the Chapter Basic Idea Outline of Control Flow Testing
CONTROL FLOW TESTING.
Structural testing, Path Testing
Types of Testing Visit to more Learning Resources.
Software Quality Engineering
UNIT-4 BLACKBOX AND WHITEBOX TESTING
Fabiano Ferrari Software Engineering Federal University of São Carlos
Sergiy Vilkomir January 20, 2012
Moonzoo Kim School of Computing KAIST
Automated Fitness Guided Fault Localization
Introduction to Software Testing Chapter 3.2 Logic Coverage
Structural Coverage.
Sudipto Ghosh CS 406 Fall 99 November 16, 1999
Structural Coverage.
Whitebox Testing.
Introduction to Software Testing Chapter 3.2 Logic Coverage
UNIT-4 BLACKBOX AND WHITEBOX TESTING
Software Testing.
Mitigating the Effects of Flaky Tests on Mutation Testing
Unit III – Chapter 3 Path Testing.
Presentation transcript:

© 2006 Fraunhofer CESE1 MC/DC in a nutshell Christopher Ackermann

© 2006 Fraunhofer CESE2 What is MC/DC? Unrelated to AC/DC! MC/DC stands for Modified Condition / Decision Coverage Some kind of Predicate Coverage technique Some terms: – Condition: Leaf level Boolean expression. – Decision: Controls the program flow. Main idea: Each condition must be shown to independently affect the outcome of a decision, i.e. the outcome of a decision changes as a result of changing a single condition.

© 2006 Fraunhofer CESE3 1. Requirement The decision has taken all possible outcomes at least once. We could also say we cover both the true and the false branch (like we do in Branch Testing). If ((a) & (b) | (c)) then… truefalse

© 2006 Fraunhofer CESE4 2. Requirement Every condition in the decision has taken all possible outcomes at least once. Aims to cover compound conditions (like Condition/Decision Coverage) If ((a) & (b) | (c)) then… truefalsetruefalsetruefalse

© 2006 Fraunhofer CESE5 3. Requirement Every condition in the decision independently affects the decision’s outcome. Not like anything we have talked about, so let’s elaborate… If ((a) & (b) | (c)) then… truefalse truefalse Change the value of each condition individually while keeping all other conditions constant.

© 2006 Fraunhofer CESE6 Creating MC/DC test cases If (A and B) then… (1) create truth table for conditions. (2) Extend truth table so that it indicated which test cases can be used to show the independence of each condition.

© 2006 Fraunhofer CESE7 Creating test cases cont’d Show independence of A: – Take Show independence of B: – Take Resulting test cases are – – (T, T) + (T, F) + (F, T)

© 2006 Fraunhofer CESE8 More advanced example If (A and (B or C)) then… Note: We want to determine the MINIMAL set of test cases Here: {2,3,4,6} {2,3,4,7} Non-minimal set is: {1,2,3,4,5}

© 2006 Fraunhofer CESE9 Where does it fit in? The MC/DC criterion is much stronger than the condition/decision coverage criterion, but the number of test cases to achieve the MC/DC criterions still varies linearly with the number of conditions n in the decisions. – Much more complete coverage than condition/decision coverage, but – at the same time it is not terribly costly in terms of number of test cases.

© 2006 Fraunhofer CESE10 Object Code Coverage In some situations the compiler performs a translation of each conditions into a single decision (conditional jump) in the object code. The minimal test set for condition/decision coverage does not provide decision coverage of the generated object code. ({1,8},{2,7},{3,6}) MC/DC ensures decision coverage of the underlying object code. ({2,3,4,6} or {2,3,4,7})

© 2006 Fraunhofer CESE11 Advantages of MC/DC Linear growth in required tests: – For an expression with N uncoupled conditions, the modified condition/decision criterion can be met with a minimum of N + 1 tests by varying exactly one condition of each of the first N tests. Object code coverage: – The MC/DC criterion ensures a much higher level of decision coverage of the object code than either decision or condition/decision coverage. Operand sensitivity: – Extraneous operands that cannot independently affect the outcome are found during construction of the test set Sensitivity to non-equivalent functions:

© 2006 Fraunhofer CESE12 Efficiency For a given function of N operands and any M distinct tests, the probability P (N,M) of detecting an error in an incorrect implementation of a Boolean expression with N conditions is given by Probability of finding an error increases as N increases!

© 2006 Fraunhofer CESE13 Efficiency cont’d This suggests that breaking down compound conditions has a negative effect on the results of MC/DC based testing.

© 2006 Fraunhofer CESE14 Argument in the software industry Federal Aviation Administration’s requirement that test suites be MC/DC adequate (DO-178B). In the avionics domain, complex Boolean expressions are much more common.

© 2006 Fraunhofer CESE15 Argument in the software industry Federal Aviation Administration’s requirement that test suites be MC/DC adequate. Argument – Too expensive – “For example, one of our industrial partners reports that for one of its products of about 20,000 lines of code, the MC/DC- adequate test suite requires seven weeks to run.” Counter Argument – Significantly more effective – A recent empirical study performed during the real testing of the attitude-control software for the HETE-2 (High Energy Transient Explorer) found that the test cases generated to satisfy the MC/DC coverage requirement detected important errors not detectable by functional testing.

© 2006 Fraunhofer CESE16 Conclusion Critics lead to research work that tries to reduce testing effort through – Test suite reduction – Test suite prioritization Question: What is the difference between MC/DC and the technique discussed in the Predicat3e Paper? Paper: “Much of the benefit of the MC/DC criterion lies not so much in the specific tests selected as in the requirement that at least N + 1 tests are executed” – Question: Why not just randomly pick N+1 test cases then?

© 2006 Fraunhofer CESE17 References J.J. Chilenski and S.P. Miller, “Applicability of Modified Condition/Decision Coverage to Software Testing,” Software Eng. J., vol. 9, no. 5, pp , D. Richard Kuhn. “Fault classes and error detection capability of specification-based testing” ACM Transactions on Software Engineering and Methodology, 8(4): , October Jones, J. and Harrold, M. “Test-Suite Reduction and Prioritization for Modified Condition/Decision Coverage”, Proceedings of the IEEE International Conference on Software Maintenance ( ICSM'01), Florence, Italy, 7-9 November 2001, pp Dupuy, A. and Leveson, N. “An empirical evaluation of the MC/DC coverage criterion on the HETE-2 satellite software”, Proceedings of the Digital Aviation Systems Conference (DASC), Philadelphia, USA, October 2000.