A feature can pass all tests written against its internal branches and still fail to satisfy a missing customer requirement. Conversely, a feature can satisfy a few expected user interactions while containing untested internal paths. Neither category provides complete assurance on its own.
How black-box test cases are chosen
Black-box testers start with what the system must do. They may divide inputs into equivalence partitions, test values at boundaries, examine decision tables or model state transitions. For example, if a form accepts quantities from 1 through 100, good boundary tests include zero, one, 100 and 101, plus invalid types. The goal is not to send every possible number but to choose inputs likely to distinguish different expected behaviors.
Decision tables help when business rules interact. A refund policy might depend on purchase age, product type and payment method. A state-transition model is more useful where a user can be pending, approved, suspended or closed. In each case the oracle—the expected result—must come from an authoritative requirement or an agreed product decision, not simply whatever the software happens to do.
How white-box testing measures exercised structure
White-box testing uses implementation knowledge to identify paths or decisions that an external behavior-based suite might miss. Unit tests, static analysis and code-coverage tools can reveal untested branches or error handlers. Statement coverage is the share of executable statements exercised; branch coverage checks the outcomes of control-flow branches. These measures are useful evidence about what executed, not a percentage guarantee that the code is defect-free.
The ASTQB’s official account of ISTQB Foundation Level test techniques describes equivalence partitioning and boundary analysis as black-box techniques and statement/branch coverage as white-box techniques. It explicitly cautions that even 100% coverage does not mean all relevant defects have been found. For instance, a branch may run without verifying the result of an invalid database update.
Choose tests across component, integration and system boundaries
A parser unit test can exercise malformed input and exception paths, while an API test can verify the resulting client-visible error response. Integration tests then assess how the API, authentication service and database interact. System and acceptance tests address end-to-end behavior. The test level and the technique are different dimensions: a white-box technique can be used at more than one level, and black-box tests are not limited to a graphical user interface.
Design test data with security and privacy in mind. Avoid using production personal data in uncontrolled test environments. Use synthetic data for routine scenarios, document permission boundaries, and obtain authorization before security testing on systems owned by others. A bug-finding exercise must not become an excuse for probing unrelated third-party systems.
Map coverage to risk, not to a vanity number
Start with high-impact functions such as payments, access control, backups and critical calculations. Map requirements to black-box tests, inspect complex or security-sensitive code paths for white-box gaps, then add exploratory testing to challenge assumptions that written requirements missed. Record what was tested, in which build and environment, and which risks remain unresolved.
A good defect report makes reproduction possible: steps, inputs, expected versus observed behavior, logs with sensitive data removed and impact. When a fix is delivered, regression tests should cover both the reported failure and nearby behavior. The strongest conclusion is not that an application has ‘passed white-box and black-box testing’, but that specified risks have been examined with traceable evidence and documented limitations.