This document is licensed under a Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Unported License
  Previous Contents Index Next
Chapter 7

Workarounds

This section contains information that might be required to run tests on systems with limited resources or that require specific test configurations.

7.1 Running the Agent With Limited Resources

If the system running the JavaTest harness agent has limited resources that prevent mapping a network drive, you might have to load the test classes by using HTTP. You can do this by creating a URL class loader that can load the test classes from the JavaTest harness by way of a web server. An example of a URL Class Loader appears in the AppletViewer source code supplied as part of your Java technology source drop.

7.2 Testing Implementations That Require System.getProperties() API

The JavaTest harness security manager denies access to system properties even for the product API under test. This can affect test execution in the single-VM environment (see Chapter 4) or execution of distributed tests (the passive agent for distributed tests also executes a remote test component in single-VM mode).

To run tests for an API that requires access to system properties, you must start the JavaTest harness agent with the javatest.security.allowPropertiesAccess property set to true. You are not required to set this property for the JavaTest harness agent if you are running tests in multi-VM mode with an agent (see Chapter 4).

For example, if you run the JMX Remote API tests (tests for the javax.management.remote API) on Sun's reference runtime in single-VM mode the following VM option must be specified for both VMs running the JavaTest harness agent and the passive agent for distributed tests:

-Djavatest.security.allowPropertiesAccess=true

If you run the same tests in multi-VM mode set this option only for the passive agent.

Previous Contents Index Next
Company Info Contact Terms of Use Privacy Copyright 1994-2008 Sun Microsystems, Inc.