Surrogate is a complimentary unit testing framework, especially suitable for unit testing of large, complex Java systems. The framework integrates seamlessly with JUnit,MockEJB and various mock object implementations and is based on the AspectJ technology.
If you are tired of broken unit tests because of time-dependence, external dependencies or low quality on the tests, Surrogate might provide the answer.
The predecessor of Surrogate was used to introduce repeatable and isolated unit tests in a very large J2EE project. The project now has nearly 4000 unit tests running continously.
Surrogate provides the following features:
System.currentTimeMillis
method
or replace an object new()
assignment by a mock implementation.
This allows you to achieve ~100 % code coverage on virtually all classes
in your project.
Surrogate does not force you to use a certain type of mock objects
.
You might code your own objects from scratch, or use e.g. the
EasyMock framework.