Hi all, I'm trying to get a DbUnit set-up, as part of our unittesting infrastructure, and so far I've run into a few issues.
1. We have to determine whether a) we use DbUnit in conjunction with JUnit, in code, where we would extend DbUnit's DatabaseTestCase and have the database set-up occur in the same class as our unit test.
b) we handle the database setup declaratively using the Ant task that comes with DbUnit.
Is there a benefit to using one over the other taking into account the complexity of our database, and the potential changes in the configuration of the tests? Would it be better to decouple the setup of test data from the unit-test itself, or should an individual unit-test incapsulate everything that it needs to run?
2. Do you recommend creating a smaller dataset file by hand, or exporting a larger dataset from the database? Along the same lines, instead of inserting and deleting data as we test, can we just use the DatabaseOperation.REFRESH? The things I mentioned above, are more strategic than tactical. While I'd love to have answers to the question above, the most pressing concern right now is how to put together a dataset, with multiple tables where i would not have to list all columns in the tables that i use; and then There are some tables in our schema, that have more then 15 columns, and I only need to populate 3 or 4 of those columns. Does anyone have any examples i can look at, other than those found on the DbUnit site? I'd really appreciate all information volunteered on any of the topics above. Thanks in advance