I'm trying to find an effective way to do a full integration test of my GXT application. GUI, Server, and DB.
I don't really need to test the DB but I want a full integration test that uses it.

I have a full set of regression tests using JUNIT but I don't think that's sufficient. My problem with making integration tests deals with the state of the DB. For most of my normal tests I empty the database and put it into a known state before I run any integration tests. My problem is I can't figure out a way to do this in GXT JUNIT because I can't do an asynchronous command during beforeMethod.

I used to manage this by using a suite to organize my tests. I.E. the first "test" did nothing but empty the database. The second set up our minimal DB configuration. After that I ran a long group of tests.

The problem with this approach is that the JUNIT tests were order dependent. Because the DB state was not reset between tests, each test had to know what EVERY test before it did. If a prior test added object X all subsequent tests that used that type of objects had to know about it, otherwise any checking of how big the list of those objects was would fail.

As you might very well imagine these tests were fantasically difficult to maintain and were ultimately abandoned.

Does anyone have any good suggestions for making integration tests? I need something that tests both server and GUI. I already have good regression tests but I need something that will test all elements of the system.