Back to the glossary

Test levels and methods

Static testing

Static testing examines code, requirements or other documents without executing the software, for example through reviews or tool-based static analysis.

Also known as: static analysis, review, code review, linting

Static and dynamic

Dynamic tests execute the software and observe its behaviour. Static tests examine the work product itself instead. They find defects before anything runs at all, which makes them a natural fit for shift-left.

Forms of static testing

  • Reviews: colleagues read code, requirements or test cases, informally or as a formal inspection
  • Static code analysis: tools look for typical defect patterns such as null pointers, buffer overflows or unreachable code
  • Coding standards: such as MISRA C in embedded work, checked automatically
  • Type checking and linting: for example with mypy or Ruff for Python

Why it is so efficient

A review finds an ambiguity in a requirement before someone implements it wrongly. Static analysis runs in seconds on every change in the CI pipeline. Neither replaces dynamic testing, but together they catch a whole class of defects very early and very cheaply. In safety-critical projects static analysis is often mandatory.