Some time ago I was working (in my spare time) on database testing tools. You could see posts about asserting data, putting the datastore to a known state and about mocking it up. I started working on it because I didn’t really like what dbUnit offered at that moment. I wanted my tests to be self-contained. I didn’t want to extend any classes to be able to work with database data and on top of that I wanted to have visibility of what I check and what the expected result is inside my jUnit test cases. So I came up with some toolkit which is basically a library with the set of assertions you can directly use in jUnit to test your database fields. It’s not THAT sophisticated as dbUnit is I guess but it doesn’t have to be. ;)
Today I want to let you know that with some modifications the dbassert toolkit goes open source. You can check it out at Google code. And I’d love to hear your feedback. It’s really at early stages and I assume that there are areas that I haven’t hit yet. But we’ve been using it internally in the company I’m working for for a few months and it seems pretty good. ;)
Again it’s pretty simple which is probably good thing :) and has a few little dependencies. One from Java YAML lib and another dependency from HSQLDB. The last one is only in case if you want to be able to use dbAssert.fake_source() feature that creates internal database instance.
That’s about it. I hope you’ll find it useful.