DbUnit logo

DbUnit

A JUnit extension targeted at database-driven projects
13
15
+ 1
0

What is DbUnit?

It is a JUnit extension (also usable with Ant) targeted at database-driven projects that, among other things, puts your database into a known state between test runs. This is an excellent way to avoid the myriad of problems that can occur when one test case corrupts the database and causes subsequent tests to fail or exacerbate the damage.
DbUnit is a tool in the Testing Frameworks category of a tech stack.

Who uses DbUnit?

Companies
3 companies reportedly use DbUnit in their tech stacks, including EVRY Financial Services, Health Dynamics, and WorkForce Development.

Developers
10 developers on StackShare have stated that they use DbUnit.

DbUnit's Features

  • Ability to export and import your database data to and from XML datasets
  • Works with very large datasets when used in streaming mode
  • Helps you to verify that your database data match an expected set of values

DbUnit Alternatives & Comparisons

What are some alternatives to DbUnit?
JUnit
JUnit is a simple framework to write repeatable tests. It is an instance of the xUnit architecture for unit testing frameworks.
Mockito
It is a mocking framework that tastes really good. It lets you write beautiful tests with a clean & simple API. It doesn’t give you hangover because the tests are very readable and they produce clean verification errors.
Liquibase
Liquibase is a leading open-source tool for database schema change management. Liquibase helps teams track, version, and deploy database schema and logic changes so they can automate their database code process with their app code process.
Flyway
It lets you regain control of your database migrations with pleasure and plain sql. Solves only one problem and solves it well. It migrates your database, so you don't have to worry about it anymore.
Spring
A key element of Spring is infrastructural support at the application level: Spring focuses on the "plumbing" of enterprise applications so that teams can focus on application-level business logic, without unnecessary ties to specific deployment environments.
See all alternatives

DbUnit's Followers
15 developers follow DbUnit to keep up with related blogs and decisions.