What Is Structural Code Coverage?

  • This could be a dedicated program written in checking programming framework that is using a structural code coverage library for the automatic gathering of structural coverage reports.
  • The tester exercises program under test as a black box. Structural code coverage reports are also automatically gathered using a dedicated library for that purpose.
Structural code coverage is coverage done by focusing on the control structures of the program.
  • Statement coverage — is every statement in a program executed IN ANY ORDER?
  • Branch coverage — is every program STATEMENT and every BRANCH executed IN ANY ORDER? We stress the union of statements and branches. This is usually not stressed because every statement is executed for sure if we execute all branches.
  • Loop coverage — did we execute all possible loops in the maximal number of repetitions?
  • Multi-condition coverage — did we execute all combinations of logical expressions. Knowledge of Boolean arithmetic is the precondition for this.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store