Thursday, October 2, 2008
DbUnit for testing and moving datasets
There was the belief that hibernate would make our dataset portable to any underlying database. However, it seems that out-of-the-box, Hibernate does make our framework portable but not the dataset. This meant we would have to either write importers or exporters for our specific schema. Well, it seems that this JUnit extension called DbUnit @ http://dbunit.sourceforge.net/ solves the problem. It is also a maven plugin where it can both export and import large datasets using XML during testing to prevent data corruption. It uses the JDBC driver so it will be DBMS agnostic. Of course this will help us in unit testing as well.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment