Java Reference
In-Depth Information
Navigating through the test tree
As with other tool windows, the Collapse All and Expand All icons control the
appearance of the test tree. Expanding all the entries lets you get to all the tests,
whereas collapsing them limits the list to your top-level test cases or suites. These
options are unavailable if only a single test case is involved, because there is only
one level of hierarchy to deal with. Otherwise, you can use the tree controls to
expand and contract individual nodes of the tree as desired.
You can achieve a similar navigation through the keyboard via the left and
right arrow keys. Pressing the left arrow collapses the current node, and the right
arrow expands it. You can visit each node in the tree by continually pressing the
right arrow key until you've traversed all the entries. The up and down arrows
similarly allow you to move between the individual tests, test cases, and test suites.
7.4.2
Monitoring testing progress
Once you begin testing, a message at the top of the JU nit window appears, show-
ing the total number of tests being run in this session. After the tests have been
run, the message indicates the number of failures (if any) and the total amount of
time elapsed. All tests are run sequentially, one after the other. Tests are never run
in parallel, ensuring that your tests don't interfere with each other. Keep in mind
that the order in which tests are run is never guaranteed.
Tracking completion with the testing progress bar
The testing progress bar at the top of the JU nit window shows the percentage of
tests that have been executed so far. This bar updates continuously through the
testing process, as each test is completed, and represents the relative percentage
of completion. The color of the bar indicates the current pass/fail status of your
testing session. The bar's segments appear green if all your tests have completed
successfully so far or red if any errors or failures were encountered.
This bar tracks progress across all the tests being run in this session, not just
those that belong to the current test case or test suite. Also note that the test
progress bar indicates the relative number of tests remaining, but not necessar-
ily the amount of time left, because each test will take a different amount of time
to complete.
Watching the currently running test
If you enable the Tr a c k Ru n n i n g Te s t option in the toolbar in the JU nit window,
the test runner selects each test case as it's running, allowing you to monitor its
output or runtime statistics as they're generated. When one test completes, the
test runner automatically selects the next one.
 
 
 
 
 
Search WWH ::




Custom Search