java DBUnit is a JUnit extension targeted for database-driven projects that, puts your database into a known state between test runs. dbunit