Alex Rivera | Logout

How can I wipe data from my HSQLDB after every test?

Asked 2011-02-14T09:11:28.040
52

I had some JUnit tests already written in my project which used to populate data in the setup method. Now I have added maven to my project and I want to execute all test cases form maven i.e. using mvn test. The problem now is that my data base is not cleared after every test class has run. I need to clear the HSQLDB after test cases of each class have run.

Edit
Report

1 Answer

2

Another solution is listed in "Clearing the database between tests" http://www.objectpartners.com/2010/11/09/unit-testing-your-persistence-tier-code/

answered 2011-08-26T22:40:25.540

Your Answer