# DBSetup: A better alternative to DBUnit?

**URL:** <https://talk.openmrs.org/t/dbsetup-a-better-alternative-to-dbunit/427>\
**Category:** Development\
**Created:** [July 19, 2014, 4:48pm UTC](https://talk.openmrs.org/t/dbsetup-a-better-alternative-to-dbunit/427 "2014-07-19T16:48:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![lbat](https://talk.openmrs.org/user_avatar/talk.openmrs.org/lbat/32/8072_2.png) [@lbat](https://talk.openmrs.org/u/lbat)\
**Post date:** [July 19, 2014, 4:48pm UTC](https://talk.openmrs.org/t/dbsetup-a-better-alternative-to-dbunit/427/1 "2014-07-19T16:48:17Z")

</div>

Hi,

last week I tried out DBSetup and shared my experience with it in my blog.

I think the greatest advantage is that it offers value generators (great for id, uuid, creator, …. fields) Also, you don’t have to edit all xml files if a column is added to a table.

For the full story please read [this post](https://lbat.github.io/2014/07/19/week-9/).

Your feedback is highly appreciated!

Cheers, Lukas

---

<div class="post-metadata">

**Author:** ![alexis.duque](https://talk.openmrs.org/user_avatar/talk.openmrs.org/alexis.duque/32/7114_2.png) [@alexis.duque](https://talk.openmrs.org/u/alexis.duque)\
**Post date:** [July 20, 2014, 5:16pm UTC](https://talk.openmrs.org/t/dbsetup-a-better-alternative-to-dbunit/427/2 "2014-07-20T17:16:48Z")

</div>

Hi Lukas,

It’s really awesome you know and use DBSetup, I well know team that make it (NinjaSquad), and I worked for them during a training course last year. So of course, I use DBSetup setup instead of DBUnit 😏

Your post is a good summary of DBSetup advantages, I enjoy it for date generation, HSQL integration, convenient API, and easily mock database schema initialization using couple of SQL queries.

Cheers

Alexis
