26.3 Installing and Starting the Access Tester

The Access Tester consists of two jar files that can be used from any computer, either within or outside the WebLogic Server domain. Installing the Access Tester, involves copying the Access Tester jar files to a computer from which you want to run tests. The Access Tester must be started from a command line regardless of the mode you choose for test input: Tester Console mode or command line mode.

This section is divided into the following topics:

26.3.1 Installing the Access Tester

This topic describes how to install the Access Tester for use on any computer.

Following installation, the Access Tester is ready to use. No additional setup is required.

To install the Access Tester

  1. Ensure that the computer from which the tester will be run includes JDK/JRE 6. For example, you can test for Java as follows:
    java -version
    

    The previous command returns the following information:

    java version "1.6.0_18"
    Java(TM) SE Runtime Environment (build 1.6.0_18-b07)
    Java HotSpot(TM) Client VM (build 16.0-b13, mixed mode)
    
  2. On a computer hosting the OAM Server, locate and copy the Access Tester Jar files. For example:
    $ORACLE_HOME/oam/server/tester/oamtest.jar 
    $ORACLE_HOME/oam/server/tester/nap-api.jar 
    
  3. Store the jar file copies together in the same directory on any computer from which you want to run the Access Tester.
  4. Cert Mode: If the OAM Server communication mode is Cert, ensure that the computer from which you will run the Access Tester includes the same keystores that are defined on the agent registration page of the Oracle Access Management Console. See Introduction to Agents and Registration.
  5. Proceed as follows, depending on your environment and requirements:

26.3.2 System Properties Supported by the Access Tester

The Access Tester supports a number of configuration options that are used for presentation or during certain aspects of testing. These options are specified at startup using the Java-D mechanism.

Table 26-2describes all supported system properties.

Table 26-2 Access Tester Supported System Properties

Property Access Tester Mode Description and Command Syntax

log.traceconnfile

Tester Console and Command Line modes

Logs connection details to the specified file name.

-Dlog.traceconnfile="<file-name>"

display.fontname

Tester Console mode

Starts the Access Tester with the specified font. This could be useful in compensating for differences in display resolution.

- Ddisplay.fontname ="<font-name>"

display.fontsize

Tester Console mode

Starts the Access Tester with the specified font size. This could be useful in compensating for differences in display resolution.

- Ddisplay.fontsize ="<font-size>"

display.usesystem

Tester Console mode

Starts the Access Tester with the default font name and size (Dialog font, size 10).

- Ddisplay.usesystem

script.scriptfile

Command Line mode

Runs the script <file-name> in command line mode.

-Dscript.scriptfile="<file-name>"

control.configfile

Command Line mode

Overwrites script's "configfile" attribute containing the absolute path to the configuration XML file with the connection information. The Access Tester uses the configuration file to establish a connection to the Policy Server indicated by Connection element.

-Dcontrol.config="<file-name>"

control.testname

Command Line mode

Overwrites script's "testname" attribute of the Control element containing a string representing a name of the test series to be used in naming output script, stats, and log files. Output log files begin with <testname>_<testnumber>.

-Dcontrol.testname="<String>"

control.testnumber

Command Line mode

Specifies the control number to be used in naming output script, stats, and log files. Output log files begin with <testname>_<testnumber>.

-Dcontrol.testnumber="<String>".

Although the auto generated string is a 7 digit number based on current local time (2 character minutes + 2 character seconds + 3 character hundredths), any string can be used to denote the control number as long as it can be used in a filename.

control.ignorecontent

Command Line mode

Overwrites script's "ignorecontent" attribute of the Control element indicating the Access Tester should ignore differences in Content between the original test case and current results.

-Dcontrol.testname="true|false"

control.displayiterationstats

Command Line mode

Controls whether or not to display intermediate statistics after each iteration of the test run.

-Dcontrol.displayiterationstats="true|false"

control.loopback

Command Line mode

Runs the Access Tester in loopback mode to test the Access Tester for internal regressions against a known good script. Used for unit testing the Access Tester.

-Dcontrol.loopback="true"

26.3.3 Starting the Tester Without System Properties For Use in Tester Console Mode

To manually drive (and capture) requests and view real-time response through the graphical user interface, start the tester in Tester Console mode. This procedure omits all system properties, even though several can be used with Tester Console mode.

The jar file defines the class to be started by default; no class name need be specified. Ensure that the nap-api.jar is present in the same directory as oamtest.jar.

To start the Access Tester in console mode without system properties

  1. From the directory containing the Access Tester jar files, enter the following command:
    java -jar oamtest.jar
    
  2. Use the -help option to list all the options available for the oamtest command-line tool.
    java -jar oamtest.jar -help
    
  3. Proceed to one of the following topics for more information:

26.3.4 Starting the Access Tester with System Properties For Use in Command Line Mode

This section is divided into the following topics:

26.3.4.1 About the Access Tester Command Line Mode

To run a test script, or to customize Access Tester operations, you must start the tester in command line mode and include system properties using the Java -D option.

When running in command line mode, the Access Tester returns completion codes that can be used by shell scripts to manage test runs. When you run the Access Tester in Console mode, you do not need to act upon codes that might be returned by the Access Tester.

Shell scripts that wrap the Access Tester to execute specific test cases must be able to recognize and act upon exit codes communicated by the Access Tester. In command line mode, the Access Tester exits using System.Exit (N), where N can be one of the following codes:

  • 0 indicates successful completion of all test cases with no mismatches. This also includes a situation where no test cases are defined in the input script.

  • 3 indicates successful completion of all test cases with at least one mismatch.

  • 1 indicates that an error prevented the Access Tester from running or completing test cases. This includes conditions such as No input script specified, Unable to read the input script, Unable to establish server connection, Unable to generate the target script.

These exit codes can be picked up by shell scripts ($? In Bourne shell) designed to drive the Access Tester to execute specific test cases.

26.3.4.2 Starting the Access Tester with System Properties

Use the following procedure to start the Access Tester in command line mode and specify any number of configuration options using the Java-D mechanism.

To start the Access Tester with system properties or for use in command line mode

  1. From the directory containing the Access Tester jar files, enter the command with the appropriate system properties for your environment. For example:
    java -Dscript.scriptfile="\tests\script.xml" -Dcontrol.ignorecontent="true" 
    -jar oamtest.jar
    
  2. After startup, proceed to one of the following topics for more information: