MockCentral is an easy-to-use, fully-featured set of tools that provides a new approach to java software testing using mock objects. It enables the developer to create and access libraries of mock objects defined in xml files external to the testing code, allowing for cleaner test cases and easy mock object organization and reuse. It is an open source project freely distributed under the Gnu General Public License.
MockCentral originated when its author was writing test
cases for a project with many complex EJB relationships and realized that there
"might just be a better way" to keep track of the proliferation of
mock object definitions. The need to detail many method expectations not
relevant to an individual unit test but required by other routines invoked in
the domain logic was cluttering up the testing code. Writing test case
variations to test different cases when many mock objects were in play involved
lots of duplication. Selectively binding and unbinding numerous proxies in the
in the right parts of the tests also required many lines of code. MockCentral
uses an external server application loading the data from xml files and managing
the mock object libraries to make this process much cleaner and easier. It also
provides an editor application used to easily edit the configuration files. This
editor is implemented as an Eclipse Plug-In which offers lots of point-and-click
functionality for defining and organizing your mock objects quickly.
Not surprisingly, we're big fans of the mock object testing approach and believe that it (combined with other strategies) can be key to producing efficiently testable java applications. MockCentral is offered in the hope that it will be useful to developers writing software tests using mock objects. Feedback is greatly appreciated and contributions from other developers to these projects are welcomed and encouraged.
Click on the link to go to detail page: http://www.mockcentral.org/home.html
Recommend the tutorial