I am working on a web application, and I would like to run a series of integration tests, with Jetty/hsqldb. So jetty will spin up, webdriver will click around a bit and then the test will finish, leaving some junk in the database. Since I want to run more then 1 test this is problematic.
In other projects we have a function that programmatically removes rows table by table, but the database for this project is complicated, and it wouldn't be feasible to make that work here.
The best solution would be to save a known state of hsql that I can load to the database before each test.
Another solution would be to drop and recreate the tables.
In all the research I've done, I've only found vague unreproducible hints, so detail would be appreciated.