about mockcentral
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.
Check out the getting started page to learn more.
latest releases
The latest MockCentral releases are: MockCentralServer version 1.1.0, MockCentralEditor-Core version 1.1.1 and MockCentral Eclipse Plug-in version 1.3.1. See the news page or the release notes accompanying the downloadable files on sourceforge.net for details.
origins and rationale
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 NamingContext 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.
acknowledgements
MockCentral is built on top of the MockObjects framework and relies on many third-party libraries, including commons-beanutils, commons-collections, commons-digester and commons-logging, all available from the Jakarta Project. The MockCentral-Editor-Core library makes extensive use of JDOM for processing the xml data. The plug-in has been built on (and with) Eclipse (www.eclipse.org).
