Which of the following describes the 'Use Case' testing technique most accurately?
Trap 1: It focuses on the structural coverage of the application code.
Use case testing is a black-box technique, not a white-box one. It focuses on functional behavior as observed from the outside, whereas structural coverage techniques focus on lines of code or branches. Conflating the two would result in an ineffective test design that misses the user-centric requirements that use cases define.
Trap 2: It is used primarily to test database performance.
Use case testing is designed for functional verification of user scenarios, not performance engineering. While performance might be affected by the operations within a use case, the technique itself does not provide the metrics or environment required to measure database performance, which requires specialized tools and dedicated performance test scripts.
Trap 3: It is a form of white-box testing based on control flow graphs.
Use case testing is purely black-box and does not rely on control flow graphs or code visibility. Control flow testing is a white-box technique used to ensure all paths through the code are executed. Using control flow principles for use case testing would be an inappropriate application of structural methods.
- A
It focuses on the structural coverage of the application code.
Why it fails: Use case testing is a black-box technique, not a white-box one. It focuses on functional behavior as observed from the outside, whereas structural coverage techniques focus on lines of code or branches. Conflating the two would result in an ineffective test design that misses the user-centric requirements that use cases define.
- B
It is based on the interaction between a system and its actors to achieve a goal.
This is the definition of use case testing. It emphasizes the flow of events between the user (actor) and the system. By testing these sequences, we ensure the system supports the user's workflow effectively, which is the primary purpose of this technique—to validate that the system delivers expected business value.
- C
It is used primarily to test database performance.
Why it fails: Use case testing is designed for functional verification of user scenarios, not performance engineering. While performance might be affected by the operations within a use case, the technique itself does not provide the metrics or environment required to measure database performance, which requires specialized tools and dedicated performance test scripts.
- D
It is a form of white-box testing based on control flow graphs.
Why it fails: Use case testing is purely black-box and does not rely on control flow graphs or code visibility. Control flow testing is a white-box technique used to ensure all paths through the code are executed. Using control flow principles for use case testing would be an inappropriate application of structural methods.