← All ISTQB Flashcard Decks

White-Box Test Design Flashcards

7 cards from real ISTQB practice questions. Tap to flip, then mark Knew It or Still Learning — missed cards come back until you master them.

Read the first 7 White-Box Test Design flashcards as text
  1. A control flow graph has 12 edges, 10 nodes, and 1 connected component. What is its cyclomatic complexity?

    Answer: 4

    Cyclomatic complexity V(G) = E - N + 2P = 12 - 10 + 2(1) = 4, indicating 4 independent paths.

  2. Which of the following BEST describes 'basis path testing'?

    Answer: Testing a set of linearly independent paths derived from the control flow graph

    Basis path testing derives a set of linearly independent paths from the control flow graph, where the count equals the cyclomatic complexity.

  3. In white-box testing, what does a 'du-path' represent in data flow analysis?

    Answer: A path from where a variable is defined to where it is used

    A du-path (definition-use path) traces the execution path from where a variable is defined (assigned) to where it is subsequently used.

  4. A condition `(A || B) && C` is evaluated. How many test cases are required to achieve full condition coverage (each atomic condition true and false at least once)?

    Answer: 3

    Full condition coverage requires each atomic condition (A, B, C) to take both true and false values, which can be achieved with 3 carefully chosen test cases (though 4 is safer in practice, the minimum is 3).

  5. What is the PRIMARY weakness of achieving only 100% decision coverage without achieving 100% condition coverage?

    Answer: Individual conditions within a compound predicate may never be evaluated as false

    Decision coverage only requires each branch outcome (true/false) to be executed once, but individual sub-conditions within a compound predicate may never independently evaluate to false.

  6. Which ISTQB white-box coverage criterion subsumes statement coverage?

    Answer: Both A and B

    Both decision coverage and path coverage subsume statement coverage because exercising all branches or all paths necessarily executes all reachable statements.

  7. A tester is analyzing a loop: `for (int i = 0; i < n; i++)`. Which data flow anomaly would be flagged if variable `result` is used inside the loop but never initialized before the loop?

    Answer: ur anomaly

    A ur anomaly (use without prior definition) occurs when a variable is referenced (used) before it has been assigned a value.