gnatpro_toolsuite

Toolsuite

Comprehensive Ada Toolsuite

GNATtest - Unit Test Harness Generator

The GNATtest tool helps automate the essential, but tedious and error-prone, processes for developing and managing the large number of test cases that accompany the verification of large software systems.

The task of writing and managing unit tests and their invocation framework is critical to the development of high-reliability software, but it is repetitive and cumbersome for large projects, and error-prone when done manually. Changes to the application software during development and maintenance, such as adding a subprogram to a package (module) or changing a subprogram’s specification (interface), require corresponding modifications to the test suite and its invocation harness. GNATtest addresses this issue by automatically creating and maintaining the harnessing code, as well as the unit test skeletons for each subprogram to be tested, taking into account all Ada semantics (subprogram overloading, visibility, etc.). The developer can thus focus on the high-value task of writing the actual test cases.

GNATtest is a valuable tool for developing all kinds of software, whether host-based or embedded, across the entire spectrum of application domains, and fits in smoothly with modern development approaches such as agile methods. It is especially valuable in systems requiring high levels of reliability, safety, and/or security, as it simplifies the effort required to implement test procedures that meet the objectives of certification standards such as DO-178B and DO-178C. These standards emphasize requirements-based testing as a critical part of the software verification process. Since individual subprograms often directly implement low-level requirements, the test harness and skeletons generated by GNATtest can become an immediate part of the application’s certification evidence. When combined with a coverage technology such as GNATcoverage, GNATtest offers a unique solution for verifying embedded Ada software.

For developers who are using the more advanced features of the Ada language, GNATtest handles object-oriented programs and can help verify local subtype consistency (known as the Liskov Substitution Principle) as required by one of the new objectives of the DO-178C’s supplement on Object-Oriented Technology and Related Techniques (DO-332). GNATtest also takes advantage of Ada 2012 programming-by-contract capabilities, such as preconditions, postconditions and invariants.

GNATtest is included in GNAT Pro and supports all versions of Ada and all target configurations. It is based on and complements the AUnit technology.