bookmark

Unitils - Testing Spring - Hibernate applications with Unitils


Description

This article demonstrates a brand new open source library for unit testing, called Unitils. Unitils helps you in writing simple and maintainable unit tests with JUnit or TestNG . It glues together some widely used test libraries like DbUnit and EasyMock and offers integration with Spring and Hibernate . Unitils encourages applying good practices and unit testing guidelines. The ideas behind the code are based on the authors' concrete experience on enterprise projects.

Unitils offers following features

* Equality assertion through reflection, with options like ignoring Java default/null values and ignoring order of collections
* Support for database testing involving test data management with DbUnit, automatic maintenance of unit test databases and automatic constraints disabling
* Hibernate integration features such as session management and testing the mapping with the database
* Integration with Spring, involving ApplicationContext management and injection of spring managed beans
* Integration with EasyMock and injection of mocks into other objects

Preview

Tags

Users

  • @gresch

Comments and Reviews