ITWissen.info - Tech know how online

unit tests

Unit tests are software development procedures in which individual software components (units) are tested. They are thus a preliminary stage to the classic program test, in which the components connected to form a finished overall system are tested in their interaction.

The underlying thought is the so-called Design By Contract (loosely translated thus the contractual draft of software components). Here each component is set a clearly outlined task and described exactly, how it must behave outward. The adherence to such a contract can be tested, without having to merge the component into the total system. It is sufficient rather a very rudimentary test program, which can consist of few lines and the component calls.

That all used components fulfill their contracts and thus the unit tests pass, is the necessary condition for a functioning total system. Only if this condition is fulfilled, the expenditure is worthwhile to test the entire system.

In practice unit Testing is supported in the meantime by libraries and tools. Developers are encouraged to program the test code, the so-called test cases, for each component at the same time. During the development time, these are then automatically executed again and again and the results are evaluated. Newly developing and changing code are subjected in such a way to a constant quality control and one prevents the unnoticed infiltration of new errors into already tested components, which is otherwise often to be observed in practice.

Informations:
Englisch: unit tests
Updated at: 09.06.2006
#Words: 236
Links: software (SW), program, test, system, interaction
Translations: DE
Sharing:    

All rights reserved DATACOM Buchverlag GmbH © 2022