Skip to content

Control Flow Testing

Control flow testing 是 technique.

1. Contructing CFG

单入口/单出口

graph TD;
    A(Start) --> B[Initialize Variables];
    B --> C{Iterative Calculation};
    C -->|Each Iteration| C;
    C --> D["Check (L < X < U)"];
    D -->|True| E[Output X];
    D -->|False| F[Output -1];
    E --> G(End);
    F --> G;

Screenshot 2024-03-22 at 17.35.08

Step2: Path Definition and Path Selection

顺序串联: Sequential concatenation: G = G1 ◦ G2

MxN combined paths

Nesting: G = G1(G2)

M + N - 1 combined paths

Step3: Sensitization

选择好路径之后, 用具体的数字进行填充

  • Logic Sensitization
  • Algebraic Sensitization