E-Tester: a Contract-Aware and Agent-Based Unit Testing Framework for Eiffel

Jonathan S. Ostroff, Richard F. Paige, David Makalsky, Phillip J. Brooke
2005 Journal of Object Technology  
We describe a contract-aware unit testing framework, E-Tester, for the Eiffel programming language. The framework differs from JUnit in its first-class support for lightweight formal methods, through test support for contracts and assertions. As well, it supports a form of negative test, called violation cases, which aim at validating contracts. It also differs based on its use of agents for expressing tests and test cases. We compare E-Tester with JUnit and suggest several advantages it
more » ... with the additional aim of making recommendations for improving JUnit's support for testing software with contracts. We also explain how it can be applied within a test-driven process for building reliable systems. Eiffel is an object-oriented programming language and method [12] ; it provides constructs typical of the object-oriented paradigm, including classes, objects, inheritance, associations, composite ("expanded") types, generic types, polymorphism and dynamic binding, and automatic memory management. The BON modelling language [18] is a language designed to work seamlessly and reversibly with Eiffel. We use BON in a number of examples in later sections; it offers features similar to UML's class and collaboration diagrams, though its integrated support for design-by-contract is superior to that of UML and OCL [15] .
doi:10.5381/jot.2005.4.7.a4 fatcat:bforgcdrbzawfhmm464p666oba