Eclipse 2.0 has integrated support for JUnit. The org.eclipse.jdt.junit plugin supports launching JavaUnit tests from Eclipse and to view the test results.
Create a test suite for a specific class, and select which methods should have tests stubbed in.
Junit results and controls integrated directly in Eclipse
Click on a test to open editor to that test, click on stack trace to view appropriate
Auto create test suites for a given package
Unfortunately, you have to put in a call to each package's suites to make a master suite, but seeing as one generally creates many more classes than packages, it's not too bad.
Rerun individual tests when run in debug mode
Test case wizard will automatically add code to allow stand alone running of test cases in Swing, AWT or text modes
(not quite what all else they're putting in, it's still in a functional 'preview' release)
EclipseIde supports parallel source folders, making it quite easy to separate tests from production code without messing around with packages. Only real problem I have with it is that it doesn't automatically add a new test case to the package's test suite, even though eclipse will regenerate the suite with the appropriate case added on request ('Recreate Test Suite'); really a minor issue though, I'm quite happy with the integration they've done. -- WilliamUnderwood
In the 2.1 development stream the JUnit plugin can find and run all tests inside a package, source folder or project.
It would be nice if the JUnit plugin could search for classes using a name filter (like in Ant). That way we could specify *Test to find tests. As it is now, if you subclass TestCase to make project specific additions (clean up or common meaningful asserts) you will get a warning that the subclass has no tests in it. This happens even if the subclass is in a different source folder than the tests.
A workaround would be to unwrap Eclipse's junit.jar to add entries to excluded.properties and wrap it again. But that seems like a lot of work to do every time you want to subclass TestCase. And it certainly is not project specific...