White-box testing, also known as structural testing, involves testing the internal structures or workings of an application, as opposed to its functionality (which is tested by black-box testing). The correct statement about white-box testing is that it helps find defects by measuring aspects such as statement coverage.
Statement Coverage: White-box testing techniques like statement coverage measure whether each statement in the code has been executed at least once. This helps ensure that all parts of the code are tested and can reveal defects in areas that might not be reached by black-box testing alone.
Other statements are less accurate in the context of white-box testing:
Specifications being vague: White-box testing is code-focused, not requirement-focused. If specifications are vague, it affects both white-box and black-box testing. The main advantage of white-box testing is that it allows testers to create tests based on the code's structure and logic.
Requirements-based coverage: This is typically associated with black-box testing, which derives tests from specifications and requirements. White-box testing, on the other hand, derives tests from the code itself.
Focus on defects rather than failures: Both white-box and black-box testing aim to identify defects, but white-box testing does this through code coverage and examining the code paths directly. It does not focus exclusively on defects rather than failures; it is just another method to identify potential issues.
Contribute your Thoughts:
Chosen Answer:
This is a voting comment (?). You can switch to a simple comment. It is better to Upvote an existing comment if you don't have anything to add.
Submit