Troubleshooting

The JavaTest harness provides information in the following topics that you can use to troubleshoot problems:

JavaTest Harness Exit Codes

When the JavaTest harness exits, it displays an exit code that you can use to determine the exit state. The following table contains a detailed description of the exit codes.

Exit Code Description
0 If tests were executed, all tests passed.
1 One or more tests were executed and failed.
2 One or more tests were executed and had errors.
3 There was a problem with the command-line arguments.
4 JavaTest harness internal error.

Problems Using the JavaTest Harness

If the JavaTest harness fails, you can use the harness.trace file in your work directory to troubleshoot the problem. The harness.trace file is a plain-text file that contains a log of JavaTest harness activities during the test run. It is written in the work directory, is incrementally updated, and is intended primarily as a log of JavaTest harness activity.

Problems Running Tests

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. See Troubleshooting a Test Run in the JavaTest Harness User's Guide: Graphical User Interface for information about the resources that the JavaTest harness provides for troubleshooting.

Tests with Errors

Tests with errors are tests that could not be executed by the JavaTest harness. These errors usually occur because the test environment is not properly configured. Use the GUI Test tabbed panes and configuration editor window to help determine the change required in the configuration.

The following is an example of how the GUI Test Manager tabbed panes and the configuration editor window can be used to identify and correct a configuration error:

  1. Use the test tree to identify the folder(s) containing test(s) that have errors.
  2. Click the folder icon to open its Summary tab in the Test Manager window.
  3. Click the Error tab to display the list of tests in the folder that has errors.
  4. Double-click a test in the list to display it in the test tree and view its detailed test information.
  5. Click the Test Run Messages tab to display detailed messages describing what happened during the running of each section of the test. The contents of each output section vary from test suite to test suite. Refer to your test suite documentation for detailed descriptions of the test section messages when troubleshooting a test run.
  6. Click the Configuration tab to display a two column table of the name/value pairs that were derived from the configuration file and used to run the test. The names in the table identify test environment properties used by the JavaTest harness to run the test. The values displayed were used to run the test. Refer to your test suite documentation for detailed descriptions of the name/value pairs for your test.
  7. Choose Configure > Show Question Log to view the Question Log of the current, saved configuration. Use the question log to identify the configuration value that is incorrect and its configuration question.
  8. Press F2, choose Configure > Change Configuration from the menu bar, or click the button on the tool bar to open the configuration editor window.
  9. Search the configuration file for the specific characters or character strings that must be changed.
  10. Click the Done button to save your changes to the configuration file and rerun the tests.

Tests that Fail

Tests that fail are tests that were executed but had failing results. The test or the implementation may have errors.

The following is an example of how the GUI Test Manager tabbed panes can be used to identify and correct a test failure:

  1. Use the test tree to identify the folder(s) containing test(s) that had errors.
  2. Click the folder icon to open its Summary tab in the Test Manager window.
  3. Click the Error tab to display the list of tests in the folder that had errors.
  4. Double-click a test in the list to display it in the test tree and view its detailed test information.
  5. Click the Test Run Messages tab to display detailed messages describing what happened during the running of each section of the test. The contents of each output section vary from test suite to test suite. Refer to your test suite documentation for detailed descriptions of the test section messages when troubleshooting a test run.

Problems Viewing Reports

The JavaTest harness does not automatically generate reports of test results after a test run. You must generate test reports either from the command line or from the JavaTest harness GUI.

Problems Writing Reports

You use filters to write test reports for a specific set of test criteria. See Creating Reports in the JavaTest Harness User's Guide: Graphical User Interface. Verify that you are using the appropriate filter to generate reports of test results.

Problems Moving Reports

Test reports contain relative and fixed links to other files that may be broken when you move reports to other directories.

You must update these links when moving reports to other directories. The JavaTest harness provides an EditLinks utility that updates the links in the reports for you when moving reports.