Principle of unit/module testing with TESSY
For programs written in the C programming language, a unit or a module is a function in the sense of C; for programs in C++, a unit or a module is a method. To start unit/module testing with TESSY, you simply browse for the source module containing the unit to be tested.
TESSY automatically determines the interface of the unit under test. The interface essentially consists of the set of input variables and the set of output variables of this unit. TESSY automatically generates the software for a test driver that allows the unit under test to be called in isolation from the rest of the application. The user supplies the test input data to the unit under test and the expected results.
Units called by the unit under test can be replaced by stubs (also known as mocks) with a defined behavior. Such stubs can check whether they were called with valid parameters and can return predefined values with which the unit under test shall work. These stubs are created by TESSY completely. Test drivers and the unit under test are compiled and linked by TESSY, usually with the cross compiler for the embedded system in question. The tests are carried out by TESSY directly on the embedded system, but can also run on the host. Actual test results are automatically compared to expected results and test reports are generated.