I'm having a rather strange issue with DBUnit, which I don't understand that well.
I'm reading through the output window in NetBeans to see what is happening when my application starts up, it seems that DBUnit is inserting my test data into my tables, but further down, the tables are dropped and re-created.
This seems to happen about 3 times over. I've cleared the output window and started up, so not sure why it has cycled 3 times over.
Anyway, from the code below, can anyone please hazzard a guess to where I have gone wrong?
My application starts up OK, I just have no data available, tables are all empty
What I'm trying to achieve is; to have an XML with all my test data, so everytime I start up I have the same clean set of data. Currently everytime I start up I have to manually run SQL insert statements due to derby not retaining data after restarting.
Its strange, if I look at my test data, and change the value of the ID from an integer, to "abc", then when I start up my application it gives a numberFormatException
But it still never halts at any breakpoints I put on my DBUnitBootstrapper.
As far as I'm aware, when application loads up, it goes through application context to initialise all the beans. The DBUnit bean calls the init-method, which links to the execute() method on the bootstrapper, it should then populate the datasource with data from the XML.
Am I missing something obvious?
subject: DBUnit, why insert test data, only to delete/re-create tables after?