TTCN-3 Framework for Java Unit Testing
TTCN-3 (you can read more on Wikipedia) is a language designed for testing of communicating systems. A TTCN-3 test system has a high level, plugin-based architecture. This design allows the language to be used for Java invocations as well. This project offers full support for creating Java Objects, invoking methods, reading and writing their public fields and handling exceptions. Despite the fact that TTCN-3 is not object oriented, this project offers full support for type inheritance when catching exceptions and enforces type checks for method parameters, in order to catch programming errors at compile time.
The solution presented here is in the form of an Eclipse plug-in. It implements standard interfaces needed by components of a TTCN-3 test system and needs Testing Technologies' TTworkbench IDE (based on the Eclipse IDE) in order to run. The IDE needs to compile and run TTCN-3 code (which the standard Eclipse does not) but you will find that the concepts and the implementation only rely on standardized interfaces and not vendor-specific tools.
Besides being a `proof of concept', some particular uses are listed below.
During testing, certain operations (e.g. computing a checksum) need to be performed outside of the test system itself by other programs. In TTCN-3, these are stateless calls. If some sort of object state needs to be maintained between them, the operations can be performed by methods in a Java class and called from the TTCN-3 source code of your testcase.
TTCN-3 was designed to handle the particularities of communicating systems (and their tests) better than general-purpose programming languages. If your Java unit tests concern communication with another system, and TTCN-3 may serve as a tool, this project adds Java testing support to a TTCN-3 test system.