Archive

Posts Tagged ‘dbunit’

Speeding up your DBUnit tests with JavaDB

June 8th, 2008 Nicolas Frankel No comments

Introduction to DBUnit

DBUnit logoWith the developed use of JUnit, many additions were made to it. These additions take advantage of the pluggable nature of JUnit. One of these contribution is DBUnit. DBUnit enables your unit tests to:

  • preload the database with datas pertaining to your current test only,
  • run your unit test (as usual),
  • remove the data you preloaded in order to put the database in the same it was before your additions.

In effect, you can now test your DAO classes. Let’s take a (very) simple example: Read more…

Categories: Java Tags: , , ,