Fork me on GitHub

DbSetup, from Ninja Squad

DbSetup is a free, open-source Java API that helps you setup your database data to execute DAO/Repository unit tests. It plays in the same league as tools like DBUnit, but is much simpler, and focuses on a single task: populate the database with test data.

New: since version 2.1.0, a nice Kotlin DSL is also available!

No XML

DbSetup is full Java. No XML or YAML file to create. No SQL script. The test data is one control-click away from the source of your test.

No dependencies

DbSetup is simple, and self-contained. You don't need any additional dependency to use it. No log4j, no commons-lang, nothing.

Fast

The fastest setup is a setup that you can avoid completely. DbSetup can populate your database only if it needs to, making your read-only tests much faster.

Open-source

DbSetup is open-source. You can browse or download the sources, fork the project and submit bugs and RFEs on GitHub.