Normally you would run all JUnit tests to ensure that changes haven’t broken any of the tests. But sometimes you want to focus on a single test method and only rerun that test, especially if running all tests is too slow or if you write a single (failing) test upfront.
For example, in the following code you might only want to run testMethod2():
public class SomeTest { @Test public void testMethod1() {...} @Test public void testMethod2() {...} }
Eclipse provides a couple of ways to run individual test methods, one from within the editor itself and another from the JUnit view. It also has especially good keyboard support so you can run those tests without reaching for the mouse.