Home
Push back the Java and J2EE code generation limits
Automate your Java tests

Test before you code! This useful reminder brought to the forefront by the eXtreme Programming (XP) approach, remains difficult to implement in projects, due to the lack of easy-to-use tools.
This is why the advocates of XP, in the aim of facilitating this practice, have developed the JUnit library, which provides an Open Source framework dedicated to executing Java tests.
Objecteering/UML provides the same approach, by allowing easy modeling of test cases and automatic generation of calls to JUnit.
In this way, tests benefit from the MDA approach: with Objecteering/Tests For Java, simply model tests in UML and then let the tool generate the code and the test documentation.

Model your tests in UML

Objecteering/UML uses for tests a model known to all users: UML sequence diagrams. These are instantiated by the user with test cases expressed through UML notes. Wizards guide the user in the writing of these test cases. This test modeling, realized along-side the application model, is non-intrusive and preserves the legibility of the model.
During the unit test phase, each method is tested. Test cases des-cribe the activation of a method, by instantiating its call parame-ters, and specify the expected return value of the attributes and states of the class.
According to the test strategy used, the user defines nominal test cases, at the limits or not.

Generate unit tests
Test code is completely generated from test modeling. This code also includes stub, used to test a class whose environment is not yet implemented.
Test code is non-intrusive code. It contains invocations to the JUnit test execution library.
The gain in productivity is at least 50% for the unit test phase.
The additional gain made during the integration phase is another important source of productivity.
Included in Objecteering/UML Editions: Screenshots of this topic:
(click on thumbnail to view full size image)
Unit Tests generation example
[Home] [Products] [Download] [Services & Support] [News & Events] [About us] [Contact] [Sitemap
Copyright© 2006 Objecteering Software, All Rights Reserved