Limitations

SpringUnit (currently at version 0.5) depends on particular versions of Java, Spring, and JUnit.

  • SpringUnit makes use of generics and is coded using Java 5.
  • SpringUnit extends JUnit version 3.8.1. The naming conventions of "classic" JUnit must be followed.
  • SpringUnit was built using Spring version 1.2.8 although it has been successfully used with Spring 2.0.x. Beans in SpringUnit currently may have only one of two scopes: singleton and prototype. Prototype scope should be used for beans that are stateless, and singleton scope should be used for beans that are stateful. Using singletons in JUnit tests usually has undesirable effects. Therefore, tests that use singletons should typically refresh Spring's application context at set up or tear down. Examples of this pattern can be found in the case study in the packages org.springunit.framework.samples.jpetstore.domain.logic.hibernate and org.springunit.framework.samples.jpetstore.dao.
  • Integration tests using SpringUnit have been tested using Hibernate and MySQL. Anyone with experience using SpringUnit different O/R frameworks or databases is encouraged to report their experiences.
The following potential enhancements to SpringUnit are under consideration:
  • Creation of a Java 1.4 branch
  • Creation of a branch based on JUnit 4.0 and Spring 2.0
  • Introduction of Spring 2.0 custom bean scopes
You are encouraged to submit a feature request or contact the developer.