Changes between Version 13 and Version 14 of GCI/Documentation/CoverageAnalysis/Coverage


Ignore:
Timestamp:
Dec 8, 2018, 8:02:46 PM (6 months ago)
Author:
shashvat jain
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • GCI/Documentation/CoverageAnalysis/Coverage

    v13 v14  
    3434Object Coverage requires that each line of generated assembly be executed.  This can be a very good general criteria because it ensures most of the test cases that the other criteria ensure.
    3535
    36 == Criteria Relationships ==
     36=== Criteria Relationships ===
    3737
    3838
     
    4141Each of these criteria can be used independently to analyze the code in question.  Application of any one criteria will likely improve the test suite to some degree albeit at the cost of increasing the complexity of the test suite.  Examination of the criteria collectively, shows that there are clear relationships between the different criteria as shown in the picture.  The completeness and complexity of the test suite increases as it satisfies first Statement Coverage and then Decision Coverage and finally !Condition/Decision Coverage.  If the test suite satisfies Statement Coverage, it will partially satisfy Decision Coverage and !Condition/Decision Coverage.  If the test suite satisfies Decision Coverage, it will completely satisfy Statement Coverage and partially satisfy !Condition/Decision Coverage.  Note the fact that Object Coverage satisfies part of all of the other criteria.  There is also a complexity relationship where Statement Coverage is the least complex to satisfy and !Condition/Decision Coverage is the most complex to satisfy.
    4242
    43 == An Example ==
     43=== An Example ===
    4444
    4545
     
    5151|| B || do something || B || do something instructions ||
    5252
    53 === Statement Coverage ===
     53==== Statement Coverage ====
    5454
    5555
    5656A single test case that allows the if statement to evaluate to TRUE will execute blocks A and B.  This will achieve 100% Statement Coverage.
    5757
    58 === Decision Coverage ===
     58==== Decision Coverage ====
    5959
    6060
    6161A minimum of two test cases are required to achieve 100% Decision Coverage.  One case must force the if statement to evaluate to TRUE and the other case must force the if statement to evaluate to FALSE.  A test case that forces a TRUE outcome will either execute blocks A1 and B or A1, A2 and B.  A test case that forces a FALSE outcome will execute blocks A1 and A2.
    6262
    63 === !Condition/Decision Coverage ===
     63==== !Condition/Decision Coverage ====
    6464
    6565
    6666A minimum of two test cases are required to achieve 100% !Condition/Decision Coverage.  In the first case, x and y must be TRUE.  In the second case, x and y must be FALSE.  The test case that forces a TRUE outcome will execute blocks A1 and B.  The test case that forces a FALSE outcome will execute blocks A1 and A2.
    6767
    68 === Object Coverage ===
     68==== Object Coverage ====
    6969
    7070
    7171One carefully chosen test case where x is FALSE and y is TRUE will achieve 100% Object Coverage.  The test case will execute blocks A1, A2 and B.
     72
     73{{{#!comment
     74TBD : MC/DC Analysis : give a technical description on MC/DC .UNDER THEORY
     75}}}
    7276
    7377