Debugging Test Problems

Previous Next Contents

8 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. Note that most of these suggestions are only relevant when running the test harness in GUI mode. This is a dummy change and will be reverted.

This chapter includes the following topics:

8.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 JavaTest harness. These errors usually occur because the test environment is not properly configured.

  • Failures: Tests that fail were executed but had failing results.

The Test Manager GUI provides you with a number of tools for effectively troubleshooting a test run. See the JavaTest User’s Guide and JavaTest online help for detailed descriptions of the tools described in this chapter.

8.2 Test Tree

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:

  • Green: Passed

  • Blue: Test Error

  • Red: Failed to pass test

  • White: Test not run

  • Gray: Test filtered out (not run)

8.3 Folder Information

Click a folder in the test tree in the JavaTest GUI to display its tabs.

Choose the Error and the Failed tabs 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.

8.4 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.

Note

You can set harness.log.traceflag=true in <TS_HOME>/bin/ts.jte to get more debugging information. In a terminal window, you can also set an environment variable HARNESS_DEBUG=true to display more debugging information.

8.5 Report Files

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 Test Reports for more information.

8.6 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. 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 harness.trace file in the report directory is written).

When aborting a test run, consider the following:

  • If you abort a test run when running the JavaTest harness in GUI mode, the GUI tools automatically cleans up your environment for the next test run. This cleanup includes undeploying any components or applications that may deployed or registered with the Application Server.

  • If you abort a test run in command-line mode (by pressing Ctrl+C), your environment might not be left in a clean state, causing potential failures in subsequent test runs. In such cases, you may need to perform the following procedure to restore your environment to a clean state.

To restore your environment after aborting a test run in command-line mode, perform these steps.

  1. Log in to the Eclipse GlassFish 6.0 Application Server with the asadmin command.

  2. List all registered components with the asadmin list-components command.

  3. Undeploy any listed components related to your test run with the asadmin undeploy listed_component command.


Previous Next Contents
Eclipse Foundation Logo  Copyright © 2018, 2020 Oracle and/or its affiliates. All rights reserved.