blob: 9f88e98b67a78d4c7d79fcdc3aee5d817a18e083 [file] [log] [blame]
type=page
status=published
title=Debugging Test Problems
next=faq.html
prev=using.html
~~~~~~
include::attributes.conf[]
Debugging Test Problems
=======================
[[GBFUV]]
[[debugging-test-problems]]
6 Debugging Test Problems
-------------------------
There are a number of reasons that tests can fail to execute properly.
This chapter provides some approaches for dealing with these failures.
This chapter includes the following topics:
* link:#GBFYP[Overview]
* link:#GBFVP[Test Information]
* link:#GBFYF[Configuration Failures]
[[GBFYP]][[overview]]
6.1 Overview
~~~~~~~~~~~~
The goal of a test run is for all tests in the test suite that are not
filtered out to have passing results. If the root test suite folder
contains tests with errors or failing results, you must troubleshoot and
correct the cause to satisfactorily complete the test run.
* Errors: Tests with errors could not be executed by the Junit
framework. These errors usually occur because the test environment is not
properly configured.
* Failures: Tests that fail were executed but had failing results.
For every test run, the Junit framework creates a set of report files
in the target directory.
If a large number of tests failed, you should read
link:#GBFYF[Configuration Failures] to see if a
configuration issue is the cause of the failures.
[NOTE]
=======================================================================
You can set `junit.log.traceflag=true` as System property to
get more debugging information.
=======================================================================
[[GBFVP]][[test-information]]
6.2 Test Information
~~~~~~~~~~~~~~~~~~~~
To display information about a test in the JavaTest GUI, click its icon
in the test tree or double-click its name in a folder status tab. The
tab contains detailed information about the test run and, at the bottom
of the window, a brief status message identifying the type of failure or
error. This message may be sufficient for you to identify the cause of
the error or failure.
If you need more information to identify the cause of the error or
failure, use the following tabs listed in order of importance:
* Test Run Messages contains a Message list and a Message section that
display the messages produced during the test run.
* Test Run Details contains a two-column table of name/value pairs
recorded when the test was run.
* Configuration contains a two-column table of the test environment
name/value pairs derived from the configuration data actually used to
run the test.
[[GBFYF]][[configuration-failures]]
6.3 Configuration Failures
~~~~~~~~~~~~~~~~~~~~~~~~~~
Configuration failures are easily recognized because many tests fail the
same way. When all your tests begin to fail, you may want to stop the
run immediately and start viewing individual test output.
include::debug-tips.inc[]