We have a lot of integration tests written using JUnit 3, though we're now running them with 4.4. A few of these have a need for a tearDown method that runs after all the tests in the class are complete (to free some common resources).
I see that this can be done in junit 4 with @AfterClass (org.junit). However, mixing this into existing junit 3 tests that extend TestCase (junit.framework.*) doesn't seem to work. [BTW is there a migration tool yet? Question 264680 indicated there wasn't one a year ago.]
I've seen mention of using junit.extensions.TestSetup for this kind of thing. My brief testing of this didn't seem work. Any examples?