JUnit View

The JUnit view (in the Java perspective) shows the progress and results of JUnit tests. Use it to see what tests failed and why (see Part V for instructions on how to run unit tests).

The JUnit view has two panes, each with its own toolbar. The JUnit tests pane (see Table 20 for toolbar commands) lists the tests that failed (or a hierarchy of all tests). When you select a failed test in this pane, the Failure trace pane (see Table 21 for toolbar commands) shows a traceback pinpointing where the failure occurred. Double-click on any test name, class name, or traceback line to edit the source code at that point.

Table 7-12. JUnit tests toolbar

Icon

Description

Go to the next failed test.

Go to the previous failed test.

Stop the current test run.

Rerun all tests.

Rerun just the tests that failed.

Keep the test list from scrolling.

Table 7-13. Failure ...

Get Eclipse IDE Pocket Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.