views:

240

answers:

1

Hi,

I use DbUnit to load data into a DB for some integration tests. The data is specified in a flat XML file like so:

<user id="2" name="bob" type="user">
<user id="1" name="john" type="admin">

However in the case of one table, the rows I wish to insert are based on rows already inserted into other tables. The most convenient way for me to achieve this would be by running an insert-select statement, rather than specifying the rows via XML as above. Does DbUnit support loading data via a mixture of insert-select statements and XML in this fashion?

Thanks, Don

+1  A: 

I tried lots of different configurations with DbUnit, but all of them were based on plain XML files. I've seen no option to mix them with SELECT statements and I really think this option doesn't exist.

tangens
Unfortunately, I think you're right
Don