Testing Internal Procedures and Internal and Private Variables

Component Testing for Ada

Black box testing is not sufficient as soon as you want to test the following:

  • Internal procedures of packages

  • Internal variables of packages

  • Private type variables

For packages, you can test internal procedures via external procedures. However, it is sometimes easier to test them directly.

You cannot modify or test internal variables with a black box approach. Internal variables are generally tested via external procedures, but it is sometimes easier to modify and test them directly also.

Private type variables are also a problem because their structure is not visible from outside the package.