Multiple choice technology testing

Code coverage is

  1. Static White-box

  2. Dynamic White-box

  3. Static Black-box

  4. Dynamic Black-box

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

Code coverage is a Dynamic White-box testing technique. It requires executing the code with test cases (dynamic) and analyzing the internal structure/branches (white-box). Static analysis examines code without execution, while black-box testing ignores internal structure.

AI explanation

Code coverage is a dynamic technique because it requires actually executing the code (running test cases) to measure which lines, branches, or paths were exercised — you can't compute it by static inspection alone. It's also white-box because it requires knowledge of and access to the internal code structure (statements, branches, paths) rather than just external behavior, which is what distinguishes white-box from black-box testing. Static White-box (e.g., code reviews/complexity metrics) and both black-box options don't involve measuring internal execution coverage.