Check out the iBATIS 3 unit tests, or JPetStore 5 (which is still an iBATIS 2 implementation, but irrelevant to this topic).  They all demonstrate ways of creating DB schemas for unit testing. 

That said, it's not an official feature of iBATIS.  It is just one of many approaches (some people use Ant tasks to do this etc.)


On Thu, Dec 10, 2009 at 10:11 AM, Soks86 <> wrote:


I'm switching my project over from Hibernate to iBATIS and have run into an
issue with writing my unit tests.

Although it is possible for me to create my DB/Tables and then keep it in my
test/resources for all my unit tests I was wondering if there is any support
in iBATIS to help users create tables and other elements that would go into
the DB schema files or some way to load schema files from inside of Java.

Is there some common way of creating tables from within Java code using
iBATIS or is there some other method I should be using?

View this message in context:
Sent from the iBATIS - User - Java mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail: