Modeling Requirements - University Of Maryland

Modeling Requirements - University Of Maryland

MC/DC in a nutshell Christopher Ackermann 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.

2 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 CESE 1. Requirement The decision has taken all possible outcomes at least once. If ((a) & (b) | (c)) then true false

We could also say we cover both the true and the false branch (like we do in Branch Testing). 3 2006 Fraunhofer CESE 2. Requirement Every condition in the decision has taken all possible outcomes at least once. If ((a) true false & (b)

true | false (c)) then true false Aims to cover compound conditions (like Condition/Decision Coverage) 4 2006 Fraunhofer CESE 3. Requirement Every condition in the decision independently

affects the decisions outcome. Not like anything we have talked about, so lets elaborate If ((a) true false & (b) true | (c)) then false

Change the value of each condition individually while keeping all other conditions constant. 5 2006 Fraunhofer CESE 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. 6 2006 Fraunhofer CESE

Creating test cases contd Show independence of A: Take 1 + 3 Show independence of B: Take 1 + 2 Resulting test cases are 1+2+3 (T , T) + (T , F) + (F , T) 7 2006 Fraunhofer CESE 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} 8 2006 Fraunhofer CESE 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. 9 2006 Fraunhofer CESE 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}) 10 2006 Fraunhofer CESE 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: 11

2006 Fraunhofer CESE 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! 12 2006 Fraunhofer CESE Efficiency contd This suggests that breaking down compound conditions has a negative effect on the results of MC/DC based testing.

13 2006 Fraunhofer CESE Argument in the software industry Federal Aviation Administrations requirement that test suites be MC/DC adequate (DO-178B). In the avionics domain, complex Boolean expressions are much more common. 14 2006 Fraunhofer CESE Argument in the software industry Federal Aviation Administrations 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. 15 2006 Fraunhofer CESE 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? 16 2006 Fraunhofer CESE References

17 J.J. Chilenski and S.P. Miller, Applicability of Modified Condition/Decision Coverage to Software Testing, Software Eng. J., vol. 9, no. 5, pp. 193-200, 1994. D. Richard Kuhn. Fault classes and error detection capability of specification-based testing ACM Transactions on Software Engineering and Methodology, 8(4):411--424, October 1999. 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.

92--101. 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. 2006 Fraunhofer CESE

Recently Viewed Presentations

  • First Things First - West Virginia Department of Education

    First Things First - West Virginia Department of Education

    CHANGE Change is: A PROCESS, not an event Made by INDIVIDUALS first, then by the organization A highly PERSONAL experience DEVELOPMENTAL growth in both feelings and skills Hord & Loucks Taking Charge of Change Nurtured Optimism Every day, we have...
  • Welcome [922church.com]

    Welcome [922church.com]

    Joshua 24:15 But as for me and my household we will serve the Lord. Pastor Bill. Let the Children Come. ... Led by Mrs. Melanie Giddings our FVL Schools Curriculum Coordinator. Phil. WELSSA Accreditation . Our School Self-Study on the...
  • OSI Model - DePaul University

    OSI Model - DePaul University

    OSI Model CS363-Winter 1999 DePaul University Group Project Info Teams formed and on the web Cases Working in Groups Last half of class tonight reserved for projects Review #1 You must connect a research institution's main offices with the testing...
  • Definitions of Competencies of Psychiatrists

    Definitions of Competencies of Psychiatrists

    UEMS Who are we?What are we standing for? Union Européenne de MédecinsSpécialistes. European Union of MedicalSpecialists. UEMS Spring meeting - Warszawa 14 April 2016
  • Printmaking M. Ryan Academic Decathlon 2005-06 Printmaking Definition:

    Printmaking M. Ryan Academic Decathlon 2005-06 Printmaking Definition:

    Printmaking M. Ryan Academic Decathlon 2005-06 Printmaking Printmaking Printmaking Printmaking Printmaking Printmaking Printmaking Printmaking Printmaking Printmaking Printmaking Printmaking Printmaking Printmaking Printmaking Printmaking Printmaking Printmaking Printmaking Printmaking Printmaking Definition: a group of mechanically aided two-dimensional processes that permit the production of...
  • Pausal Forms and Prosodic Structure in Tiberian Hebrew

    Pausal Forms and Prosodic Structure in Tiberian Hebrew

    We will propose a theory of how pausal forms, ex hypothesi marking the right edges of intonational phrases, came to co-exist with a prosodic structure that does not suit them. Introduction. We argue that the mismatch between pausal forms and...
  • Health Literacy Competencies for Health Professionals ...

    Health Literacy Competencies for Health Professionals ...

    Coleman C, Hudson S, Maine L. Health Literacy Educational Competencies for Students of the Health Professions: A Consensus Study. In review . Coleman C, Nguyen N. Health literacy teaching in U.S. Family Medicine Residencies, 2011. Unpublished.
  • Apply September 2017 - City College Norwich

    Apply September 2017 - City College Norwich

    astarfuture.co.uk . UCAS Tariff. Some course providers use UCAS Tariff points in their entry requirements too. This is a points total achieved by converting qualifications such as A levels (and many others) into points, making it simpler for course providers...