>> >> My problem is that I set up test data using DBUnit on the client in the >> begin(WebRequest) method, and then want to clean it up after the test has >> run, regardless of it has failed or not. I do not want the DBUnit JARs, >> test-data etc. transported to the server unless I absolutely _have to_. :- >> )
>On that point, my belief is that database cleaning should not be done as it is a waste of >time. Why not better set up the database in the correct state *before* each test? This >prevents side effects and is inline with the unit testing methodology which says that all >tests are independent. It's also clearer for a reader as he will know what data needs to >be set before the test. I think that database cleaning after each test is a good thing to do : as a unit test doesn't know wich test was run before it, it has to clean the entire database and then set up the entire database if the cleaning is done in the setUp() method... If you perform the cleaning at the end of the test, you just have to clean the data you generated during test execution. It might save a lot of time, especially if you intend to run the same tests under different database load conditions ! Some real life experiences on the subject ? (or maybe we should follow up the thread on a more "generalist" unit testing mailing list ?) Sebastien Brunot --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
