McCabe's criterion

De Software testing
Ir para: navegação, pesquisa

Concepts


Facts

  • For the same software, multiple sets of linear independent paths, not necessarily unique, can be created and yet satisfy the McCabe's criterion. <bib>vincenzi-maldonado:slides:2007</bib>


Procedures

  1. Derive the CFG from the software module.
  2. Compute the graph’s Cyclomatic Complexity (C).
  3. Select a set of C linearly independent paths.
    1. Pick a baseline path (it must be a complete path).
      1. This path should be a reasonably typical path of execution rather than an exception processing path.
      2. The best choice would be the most important path from the tester’s viewpoint.
    2. To choose the next path, change the outcome of the first decision along the baseline path while keeping the maximum number of other decisions the same as the baseline path.
    3. Generate the remaining paths by varying the remaining decisions, one by one.
  4. Create a test case for each basis path.
  5. Execute the test cases.

<bib>vincenzi-maldonado:slides:2007</bib>