B. Retest Changed Segments
(1) Intent
    Use code change analysis to select a partial regression test suite.

(2) Context
    The available time, personnel or equipment is not sufficient for a full regression run.
    It is applicable at the class, cluster, or subsystem scope and after maintenance, for reuse, and during iterative development.

(3) Strategy
    a. Test Model
    A regression fault must be related to a new, modified, or deleted code segment.
    All tests that have reached a changed or deleted segment are selected
    Rothermel and Harrold call this approach the “graph walk technique”
    The basic code change model does not consider data flow, control flow or other dependencies arising from state-based behavior, iteration, or recursion.
    It does not explicitly consider the effects of inheritance or dynamic binding

     b. Test Procedure
     Step1 : Obtain a report from your coverage analyzer that lists code segments by test case for the baseline SUT and test suite

         Coverage Analyzer Output
         T1: B1, B3, B6, B7
         T2: B1, B4, B8
         T3: B2, B5
         T4: B1, B4, B6

     Step2: Use a version control tool to generate a report on the
changes between the baseline and the delta

          Version Control Report
          Baseline      Delta   Change
          B1            B1      same
          B2                       deleted
          B3            B3      changed
          B4            B4      same
          B5            B5      changed
          B6            B6      same
          B7                       deleted
          B8            B8      changed
          B9                       new
 
     Step 3: Use the following rules to decide the action for test cases
          Tests under same a skip
          Tests under deleted a include
          Tests under changed a include
          Tests under new a should be empty
          ==> T1, T2, and T3 need to be rerun again

(4) Entry Criteria
     The delta components pass component scope testing
     A suitable baseline test suite exists
     The test environment has been restored to the same configuration used to run the original baseline test suite

(5) Exit Criteria
     All no pass test cases reveal bugs whose presence and severity are deemed acceptable
     All remaining test cases pass

(6) Consequences
     a. Inclusiveness
     All baseline tests that can produce a different result are selected.
     b. Precision
     Retest changed code is the most precise of the white box partial regression strategies
     Baseline tests that exercise unchanged code are not selected for testing
     c. Efficiency
     The computation is on the order of the size of the baseline or test suite times the number of segments in the smaller of the baseline or delta component
     d. Generality
     Retest changed code is applicable at class scope and requires the programmer to have skills in code analysis and related tools
arrow
arrow
    全站熱搜

    kojenchieh 發表在 痞客邦 留言(0) 人氣()