Easy unit testing with Spring and DBUnit
Openutils Testing utils
Openutils-testing extends the standard spring testing framework by providing more high-level base testing classes and utils.
In particular, it provides a framework for using with dbunit in Spring test cases.
The openutils-testing jar only contains generic classes that don't depends on any specific test framework. You should depend on openutils-testing-testng or openutils-testing-junit.
Openutils provide a base class that take cares of the common operations involved in preparing the test environment using DbUnit.
You can extend it.openutils.testing.testng.AbstractDbUnitTestNGSpringContextTests or it.openutils.testing.junit.AbstractDbUnitJunitSpringContextTests, depending on the test framework of your choice (remember to include the appropriate dependency, openutils-testing-testng or openutils-testing-junit). Apart from the underline test framework used, there is no difference in how those class will work.
Those base classes extend the standard Abstract*SpringContextTests classes provided by Spring, so they support dependency injection and needs to be configured from a Spring context.
Openutils releases are available in the main maven2 repository. You can simply add one of the following dependencies, according to your preferred testing framework.
TestNG version
<dependency>
<groupId>net.sourceforge.openutils</groupId>
<artifactId>openutils-testing-testng</artifactId>
<version>2.2.2</version>
</dependency> JUnit version
<dependency>
<groupId>net.sourceforge.openutils</groupId>
<artifactId>openutils-testing-junit</artifactId>
<version>2.2.2</version>
</dependency> Project info & quick links
-
Latest release: 2.2.2
License: LGPL v2.1 - Download Sourceforge file download area
- Bugs and feature requests OpenmindLAB Jira
- Changelog See what's new in release 2.2.2
- Source code Subversion public url
- Javadocs Documentation for the release 2.2.2
- Maven The dependency snippet for your pom