ColdFrame: Testing Domains

To set the scene, the Ada software under test (SUT) forms part of a system. Generally, the system will be constructed using a layered approach, and the other parts of the system that interact with the SUT are higher-level (which can call interface subprograms presented by the SUT) or lower-level (whose interfaces can be called by the SUT, or which can provide callbacks to the SUT).

ColdFrame supports testing at a level between unit testing (using, for example, AUnit) and integration testing (using real hardware). Using a framework intended for unit testing at this level tends to be fragile, requiring a lot of rework for even minor functional changes in the requirements.

The project Scripted Testing provides a framework for testing using a scripting language. The idea is to build a program including the SUT and stubbed versions of the lower-level domains that it uses; the program adds commands to the scripting language to interact with the stubbed versions.

This scheme is related to the use of mock objects.

The scripting language supported is Tcl, and specifically the Ada binding TclAdaShell. The reason for choosing Tcl rather than Python or Lua is that Tcl's interface is entirely string-based; this is important, considering the need to specifiy values of enumerated types.

The ColdFrame components involved are in the extras/ directory of the distribution. They are discussed in