CAST Test Design Techniques 2 ā Questions and Answers
Question 1: State transition testing is MOST appropriate when:
- The system behavior depends only on current inputs
- The system reacts differently depending on its current state and input events (Correct answer)
- The number of inputs is small enough to test exhaustively
- Code coverage metrics need to be maximized
Correct answer: The system reacts differently depending on its current state and input events
State transition testing is used when a system's response depends on both the current state and the triggering event, making it ideal for systems modeled as finite state machines.
Question 2: In a state transition diagram, what does a 'transition' represent?
- A stable condition in which the system remains
- A movement from one state to another triggered by an event or condition (Correct answer)
- An invalid sequence of inputs
- A test case that verifies system behavior
Correct answer: A movement from one state to another triggered by an event or condition
A transition represents the change from one state to another, triggered by a specific event, sometimes with a guard condition or resulting action.
Question 3: Use case testing derives test cases from:
- The internal code structure of the application
- Interactions between actors and the system that deliver value (Correct answer)
- Statistical analysis of past defect data
- The boundary conditions of numeric input fields
Correct answer: Interactions between actors and the system that deliver value
Use case testing creates test cases from use cases that describe how actors (users or systems) interact with the system to achieve a goal, ensuring end-to-end scenarios are validated.
Question 4: Which coverage criterion requires that every valid and invalid transition in a state transition model be exercised at least once?
- State coverage
- Transition coverage (Correct answer)
- All-paths coverage
- Boundary coverage
Correct answer: Transition coverage
Transition coverage (also called 0-switch coverage) requires that every transitionāboth valid and invalidāin the state model be exercised at least once.
Question 5: A tester finds that a field accepts alphabetic characters when only numeric input should be allowed. Which black-box technique BEST helps design a test case to detect this flaw?
- Statement coverage testing
- Equivalence partitioning with an invalid partition for non-numeric input (Correct answer)
- Cyclomatic complexity analysis
- Decision table with only valid conditions
Correct answer: Equivalence partitioning with an invalid partition for non-numeric input
Equivalence partitioning identifies an invalid partition (non-numeric characters) and a single test case from that partition would reveal that the input validation is missing.
Question 6: Which test design technique is SPECIFICALLY designed to handle situations where the same input can produce different outputs depending on previous inputs?
- Equivalence partitioning
- State transition testing (Correct answer)
- Boundary value analysis
- Decision table testing
Correct answer: State transition testing
State transition testing handles systems where history (current state) determines how a given input is processed, unlike stateless techniques like equivalence partitioning or BVA.
Question 7: When designing test cases using a decision table, a 'don't care' condition (marked as '-') means:
- The condition must always be true for the rule to apply
- The value of that condition does not affect the rule's outcome (Correct answer)
- The condition should be tested with boundary values only
- The condition is invalid and should be excluded
Correct answer: The value of that condition does not affect the rule's outcome
A 'don't care' entry means the condition value (true or false) has no impact on the action for that rule, allowing the table to be compressed and reducing the number of test cases.
State transition testing is MOST appropriate when: