CS FundamentalsVery hardGATE CS · TCS NQT Prime · Product Company SDE

A tester designs test cases specifically to exercise every branch of an if-else statement in the source code. This is an example of:

  1. A. User acceptance testing done by end customers
  2. B. White-box (structural) testing
  3. C. Acceptance testing
  4. D. Black-box testing

Correct answer: B. White-box (structural) testing

White-box testing uses knowledge of the internal code structure (statements, branches, paths) to design test cases; aiming for every branch is a classic white-box coverage criterion.

More Software Engineering, Git and Cloud Basics questions

Exams that ask this topic