Packages in JUnit 4: * org.junit -- published classes related to writing tests * notify -- published classes related to listening to test runs * plan -- published classes related to the structure of planned tests * runner -- published classes related to running tests * runner.extensions -- examples of new Runners * runner.internal -- implementation details of running tests * runner.internal.request -- implementation details of Requests * samples -- sample tests * tests -- the tests for JUnit Published classes in JUnit 4: * org.junit * Before -- annotation for methods to be run before each test method * BeforeClass -- annotation for methods to be run before all tests in a class * After -- annotation for methods to be run after each test method * AfterClass -- annotation for methods to be run after all tests in a class * Ignore -- annotation for test methods that are temporarily not to be run * Test -- annotation for methods that are to be run as tests * Assert -- assertion methods, expected to be used via static import * org.junit.notify * Failure -- represents a problem while running a test * RunListener -- interface for objects wanting to be updated as tests run * RunNotifier -- maintains and updates a set of RunListeners * StoppedByUserException -- can be caught by custom Runners to perform custom clean up when a test run is interactively stopped before it completes. * org.junit.plan * Plan -- base class for specifying test structure * CompositePlan -- a structure that contains multiple tests * LeafPlan -- a single planned test case * org.junit.runner * JUnitCore -- sets up listeners and runs tests * Request -- base class of any custom test specifications, and factory methods for common requests * Result -- summary of the results of running tests * Runner -- interface for custom ways of running tests (JUnit 4 tests and pre-JUnit 4 tests are handled automatically) * RunWith -- class annotation directing JUnit 4 to use a custom runner Other classes in JUnit 4: * org.junit.runner.extensions * AllTests -- runner for JUnit 3.x AllTests classes (those that only implement a static Test suite() method) * Enclosed -- runner for running all of the inner classes of a class * Filter -- interface for choosing to run only some of the tests defined by a Runner * Filterable -- interface that Runners may implement to respond to Filters * Parameterized -- runner for experimental parameterized tests * Suite -- runner for running many test classes at once * junit.framework.JUnit4TestAdapter -- see below We've improved backward compatibility, so many of your existing JUnit 3 runners may already work swimmingly. Just include the following method in a JUnit 4 test class to make it visible to JUnit 3: class MyClassesAreCorrect { // ... tests, etc. public static junit.framework.Test suite() { return new JUnit4TestAdapter(MyClassesAreCorrect.class); } }