Like many people, I want a way to run some one-time set up and tear down logic and the approach I usually take is to drop some code into a static initializer block in an abstract test case. For example...
public abstract class SomeTestCase extends TestCase {
static {
// perform the "global" set up logic
}
}
Providing that I remember to subclass SomeTestCase then this approach...