This is testing without having an insight into the details of the underlying code.
Here, we based based on a system’s specification, testing actual functionality. Black box testing helps test case generation and test oracles.
Pros and Cons
Pros
- No need for source code
- Wide applicability (unit and systems-level testing) Cons
- Does not test hidden functions
Error Guessing
In this approach, we guess based on experience. Here:
- Make list of possible errors or error-prone situations
- Yields an error model
- Design test cases to cover error model We develop and maintain our own error models. These errors models are the things I would intuitively think to test for. For example, if I’m testing an array sorting function:
- Empty array
- Already sorted array
- Reverse sorted array
Derivation from Functional Requirements
This is the point of black box testing
- Involves clarification and restatement of requirements such that requirements are testable
- Enumerate single requirements and group related requirements
- For each requirement
- One test case showing the requirement functioning
- One test case trying to falsify something
- Test boundaries
Derivation from Use Cases
For each use case:
- Develop a scenario graph
- Determine all possible scenarios
- Analyze and rank scenarios
- Generate test cases from scenarios to meet coverage goal
- Execute test cases
- See Scenarios (scenario graphs)
Other ways to do this: