Slashdot Mirror


Test Coverage Leading You Astray?

An anonymous reader writes "Are your test coverage measurements leading you astray? Test coverage tools bring valuable depth to unit testing, but they're often misused. This article takes a closer look at what the numbers on the coverage report really mean, as well as what they don't. It then suggests three ways you can use your coverage to ensure code quality early and often."

4 of 48 comments (clear)

  1. Re:Non-object oriented test tools? by yermoungder · · Score: 3, Informative

    "I'd love to hear from anyone who can recommend test coverage tools for C..."

    See http://www.polyspace.com/

  2. Re:Non-object oriented test tools? by GejTOO · · Score: 3, Informative

    Here is a list of testing frameworks for several languages.

    http://c2.com/cgi/wiki?TestingFramework

    G.

  3. The Emperor has very few clothes by ribuck · · Score: 3, Informative
    Test coverage measurement is a really dilute quality assurance tool. It can show you parts of your code that are untested, but it doesn't say anything about whether the other parts of your code are tested.

    Just executing a line of code or a branch (whilst running a test) does not imply that you are testing that code.

  4. Re:DO-178B - MCDC by Anonymous Coward · · Score: 3, Informative

    Note that DO-178B requires MCDC (Modified Condition Decision Coverage) for level A software (check DO178B page 74).
    MCDC requires that "every point of entry and exit in the program has been invoked at least once, every condition in a decision in the program has taken all possible outcomes at least once, every decision in the program has taken all possible outcomes at least once, and each condition in a decision has been shown to independently affect that decision's outcome. A condition is shown to independently affect a decision's outcome by varying just that condition while holding fixed all other possible conditions" (Miller and Chilenski).