White-Box Testing

Structural Testing

Code-aware testing based on internal structure, logic flows, and execution paths to ensure comprehensive coverage and detect hidden defects.

100%
Statement coverage
4
Coverage types
60%
More defects found
ISTQB
Certified approach
01

What is structural testing?

Structural testing (also known as white-box testing) is based on the internal code structure, logic, and implementation details of a system. Tests are designed by analyzing source code, control flows, data flows, and execution paths. This approach uses code coverage metrics to measure test adequacy and ensures that critical logic branches, loops, and conditions are thoroughly exercised.

02

Coverage techniques

Coverage Type Description Typical Target
Statement Coverage
Measures the percentage of executable statements in the code that have been executed at least once during testing. The most basic coverage metric. 80-100%
Branch Coverage
Ensures that every decision point (if-else, switch-case) has been tested with both true and false outcomes. Stronger than statement coverage. 70-90%
Path Coverage
Tests all possible execution paths through the code, including combinations of branches and loops. Most comprehensive but exponentially complex. CRITICAL PATHS
Condition Coverage
Verifies that each boolean sub-expression in conditions has been evaluated to both true and false. Catches logical errors in compound conditions. 60-80%
03

Structural testing process

1

Code analysis

Review source code, identify control flow graphs, and map decision points, branches, and execution paths.

2

Coverage target selection

Define coverage goals (statement, branch, path, condition) based on criticality and risk assessment.

3

Test case design

Create test inputs that exercise specific code paths, edge cases, and boundary conditions to maximize coverage.

4

Instrumentation and execution

Use coverage tools to instrument code, run tests, and collect execution data showing which lines, branches, and paths were hit.

5

Gap analysis and iteration

Identify untested code sections, add tests to cover gaps, and iterate until coverage targets are met.

04

Why structural testing matters

Complements functional testing

While black-box testing validates behavior against requirements, white-box testing ensures internal logic correctness and detects implementation errors.

  • Catches logic errors missed by functional tests
  • Verifies error handling and edge cases
  • Ensures code paths are exercised
  • Identifies dead code and unreachable branches

Objective quality metrics

Code coverage metrics provide quantifiable data on test completeness, guiding test effort and signaling when additional tests are needed.

  • Measurable test adequacy indicators
  • Risk-based coverage targeting
  • Continuous integration feedback
  • Regulatory compliance reporting
05

Industry standard

ISTQB Foundation Level

Structural testing techniques are defined in the ISTQB Certified Tester Foundation Level syllabus, section 4.3 (White-box Test Techniques). Our engineers are certified in ISTQB methodologies and apply industry-standard coverage criteria to every project.

Need white-box testing?

Our ISTQB-certified engineers deliver comprehensive structural testing with measurable coverage metrics and detailed reporting.

Published: February 6, 2026