<!-- Fragment document type declaration subset:
Arbortext, Inc., 1988-2005, v.4002
<!DOCTYPE BOOK PUBLIC "-//Sun Microsystems//DTD SolBook 3.1//EN">
-->
<?Pub UDT _bookmark _target>
<?Pub CX book(title()subtitle()bookinfo()chapter()>
<chapter id="GBFUV"><?Pub Caret1><title>Debugging Test Problems</title>
<highlights>
<para>There are a number of reasons that tests can fail to execute properly. This
chapter provides some approaches for dealing with these failures. Please note that
most of these suggestions are only relevant when running the test harness in GUI mode.
</para></highlights>
<sect1 id="GBFYP"><title>Overview</title>
<para>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.</para>
<itemizedlist>
<listitem><para><emphasis role="strong">Errors</emphasis> &mdash; Tests with errors
could not be executed by the JavaTest harness. These errors usually occur because
the test environment is not properly configured.</para></listitem>
<listitem><para><emphasis role="strong">Failures</emphasis> &mdash; Tests that fail
were executed but had failing results.</para></listitem>
</itemizedlist>
<para>The Test Manager GUI provides you with a number of tools for effectively troubleshooting
a test run. See the <citetitle>JavaTest User's Guide</citetitle> and JavaTest online
help for detailed descriptions of the tools described in this chapter.</para></sect1>
<sect1 id="GBFVF"><title>Test Tree</title>
<para>Use the test tree in the JavaTest GUI to identify specific folders and tests
that had errors or failing results. Color codes are used to indicate status as follows:
</para>
<itemizedlist>
<listitem><para><emphasis role="strong">Green</emphasis> &mdash; Passed</para></listitem>
<listitem><para><emphasis role="strong">Blue</emphasis> &mdash; Test Error</para>
</listitem>
<listitem><para><emphasis role="strong">Red</emphasis> &mdash; Failed to pass test
</para></listitem>
<listitem><para><emphasis role="strong">White</emphasis> &mdash; Test not run</para>
</listitem>
<listitem><para><emphasis role="strong">Gray</emphasis> &mdash; Test filtered out
(not run)</para></listitem>
</itemizedlist>
</sect1>
<sect1 id="GBFWI"><title>Folder Information</title>
<para>Click a folder in the test tree in the JavaTest GUI to display its tabbed pane.
</para>
<para>Choose the <emphasis>Error</emphasis> and the <emphasis>Failed</emphasis> panes
to view the lists of all tests in and under a folder that were not successfully run.
You can double-click a test in the lists to view its test information.</para></sect1>
<sect1 id="GBFVP"><title>Test Information</title>
<para>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 pane. The tabbed pane contains
detailed information about the test run and, at the bottom of the pane, 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.</para>
<para>If you need more information to identify the cause of the error or failure,
use the following panes listed in order of importance:</para>
<itemizedlist>
<listitem><para><emphasis role="strong">Test Run Messages</emphasis> contains a Message
list and a Message pane that display the messages produced during the test run.</para>
</listitem>
<listitem><para><emphasis role="strong">Test Run Details</emphasis> contains a two
column table of name/value pairs recorded when the test was run.</para></listitem>
<listitem><para><emphasis role="strong">Configuration</emphasis> contains a two column
table of the test environment name/value pairs derived from the configuration data
actually used to run the test.</para></listitem>
</itemizedlist>
<note><para>You can set <literal>harness.log.traceflag=true</literal> in <filename>
&lt;TS_HOME>/bin/ ts.jte</filename> to get more debugging information.</para></note>
</sect1>
<sect1 id="GBFVZ"><title>Report Files</title>
<para>Report files are another good source of troubleshooting information. You may
view the individual test results of a batch run in the JavaTest Summary window, but
there are also a wide range of HTML report files that you can view in the JavaTest
ReportBrowser or in the external browser or your choice following a test run. See
Section 5.3 &ldquo;Test Reports&rdquo; for more information.</para></sect1>
<sect1 id="GBFYF"><title>Configuration Failures</title>
<para>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. However, in the case of full-scale launching
problems where no tests are actually processed, report files are usually not created
(though sometimes a small <filename>harness.trace</filename> file in the report directory
is written).</para></sect1>
</chapter>
<?Pub *0000005119 0>
