While trying to figure out how to integrate unit tests into our project, I kept getting hung up on the need for the database to be in a known state. I've tried writing tests before that insert data in the setUp() method and delete it in the tearDown(), but this can get tedious fast.
My solution: Have two files for every TestCase class: <TestClassName>.dbSetUp <TestClassName>.dbTearDown These files will contain SQL commands, one per line. The commands in each file will be executed automatically (if they exist in the classpath) during setUp() and tearDown() respectively. My question: what's a good place in the cactus framework to put such functionality? Could ServletTestCase call this functionality at the appropriate times in the test execution? Comments? I almost have a prototype working and will submit some code when I get a chance. Thanks, Greg __________________________________________________ Do You Yahoo!? Listen to your Yahoo! Mail messages from any phone. http://phone.yahoo.com
