An example of unit testing is provided, combining all the white-box testing techniques described in the previous chapters.

Considering the manner in which the modules of a program are combined, we could highlight two types of unit testing:

The way functions and classes talk to each other in a program impact:

  • the form in which module tests cases are written
  • the types of test tools that might be used
  • the order in which modules are coded and tested
  • the cost of generating test cases
  • the cost of debugging (locating and repairing detected errors)