lib
directory and are identical to the
files used in production testing by the Jini Technology Group.
This document assumes familiarity with the documentation supplied with the
test harness kit.
com.sun.jini.test.home
. In property
files and in this document this directory will be referred to symbolically as
${com.sun.jini.test.home}
.
${com.sun.jini.test.home}/src/com/sun/jini/test/resources/qaHarness.prop.
.
That file is derived from the basicDeployment.prop
file that is
included in the harness source kit, and provides additional definitions specific
to this test suite, including the installation directory property described
above.
com.sun.jini.qa.harness.
${com.sun.jini.qa.home}/lib/jiniharness.jaris the JAR file containing the harness code and resources, and
${com.sun.jini.jsk.home}/lib/jsk-platform.jaris the starter kit platform that is typically included in the classpath of Jini clients and services.
The user must specify the name of a deployment properties file on the command
line as described above. The user must also specify the name of the primary test
suite JAR file via the command-line option -testJar
${com.sun.jini.test.home}/lib/jinitests.jar
. In the following examples,
assume that the test source kit is installed in
/files/jiniqa2_1_tests_source
, the starter kit has been installed
in /files/jini2_1
, and the harness binary kit has been installed in
/files/jiniqa2_1_harness
. Also assume that
/tmp/myharness.prop
is an edited version of
/files/jiniqa2_1_tests_source/src/com/sun/jini/test/resources/qaHarness.prop,
modified to reflect the correct installation environment.
To specify a set of test categories to run, use the -categories
option, for example:
java -cp /files/jiniqa2_1_harness/lib/jiniharness.jar:/files/jini2_1/lib/jsk-platform.jar \ com.sun.jini.qa.harness.QARunner \ /tmp/myharness.prop \ -testJar /files/jiniqa2_1_tests_source/lib/jinitests.jar \ -categories joinmanager,javaspaceThis would limit test execution to those tests whose test descriptions included either
joinmanager
or javaspace
in their definitions
of testCategories
. The configuration used would be
none
unless the value of com.sun.jini.harness.configs
had been modified in /tmp/myharness.prop.
To specify an explicit list of tests to execute, list them after
the -tests
option. For example,
java -cp /files/jiniqa2_1_harness0/lib/jiniharness.jar:/files/jini2_1/lib/jsk-platform.jar \ com.sun.jini.qa.harness.QARunner \ /tmp/myHarness.prop \ -testJar /files/jiniqa2_1_tests_source/lib/jinitests.jar \ -tests com/sun/jini/test/spec/joinmanager/EqualsTestThis would execute only the joinmanger
EqualsTest
test. The
following command line would
run this test using the jeri ConfigurationFileSet:
java -cp /files/jiniqa2_1_harness0/lib/jiniharness.jar:/files/jini2_1/lib/jsk-platform.jar \ com.sun.jini.qa.harness.QARunner \ /tmp/myHarness.prop \ -testJar /files/jiniqa2_1_tests_source/lib/jinitests.jar \ -tests com/sun/jini/test/spec/joinmanager/EqualsTest \ -com.sun.jini.qa.harness.configs jeriThe
-tests
argument is optional, and if present must be followed by
a comma-separated list of test description file names specified
relative to the root of the primary test suite JAR file. This identifies the set of
tests to place in the run list, which may be additionally filtered by
category. If omitted, all tests are placed in the run list.
The -categories
argument is optional, and if present must be
followed by a comma-separated list of test categories. When the run list is
processed, tests which do not belong to one of the specified categories are
discarded from the list. If omitted no category filtering is done.
One or both of these options must be specified.
1. In order to run the Kerberos harness configuration, you need a Kerberos KDC (Key Distribution Center) available in your network.
2. You also need to create principals for reggie, mahalo, outrigger, mercury, norm, phoenix, an executing test (this is a single principal used for all tests), fiddler, an activation group (again a single principal used for all activation groups), a server principal, and a client principal. Refer to your KDC documentation for instructions on how to create principals for that particular KDC.
3. Once the principals needed by the harness have been created, generate an aggregate password file containing the passwords for all the principals created in step 2 and store this password file in a location that is accessible to the harness. Refer to your KDC documentation for instructions on how to create password files for your KDC.
4. Edit the following section in the deployment properties file derived from
${com.sun.jini.test.home}/src/com/sun/jini/test/resources/qaHarness.prop:
# # The following properties are used to specify the kerberos # environment for tests that need to access a kdc and kerberos principals # com.sun.jini.qa.harness.kerberos.realm=[add the realm that your KDC is serving] com.sun.jini.qa.harness.kerberos.kdc=[add the name of your KDC host] com.sun.jini.qa.harness.kerberos.clientPasswordFile=[add the location for the password file created in step 3] com.sun.jini.qa.harness.kerberos.serverPasswordFile=[add the location for the password file created in step 3] com.sun.jini.qa.harness.kerberos.aggregatePasswordFile=[add the location for the password file created in step 3] com.sun.jini.qa.harness.kerberos.clientPrincipal=[add the name of the client principal created in step 2] com.sun.jini.qa.harness.kerberos.serverPrincipal=[add the name of the client principal created in step 2] com.sun.jini.qa.harness.kerberos.reggiePrincipal=[add the name of the reggie principal created in step 2] com.sun.jini.qa.harness.kerberos.mahaloPrincipal=[add the name of the mahalo principal created in step 2] com.sun.jini.qa.harness.kerberos.outriggerPrincipal=[add the name of the outrigger principal created in step 2] com.sun.jini.qa.harness.kerberos.mercuryPrincipal=[add the name of the mercury principal created in step 2] com.sun.jini.qa.harness.kerberos.normPrincipal=[add the name of the norm principal created in step 2] com.sun.jini.qa.harness.kerberos.phoenixPrincipal=[add the name of the phoenix principal created in step 2] com.sun.jini.qa.harness.kerberos.testPrincipal=[add the name of the test principal created in step 2] com.sun.jini.qa.harness.kerberos.fiddlerPrincipal=[add the name of the fiddler principal created in step 2] com.sun.jini.qa.harness.kerberos.groupPrincipal=[add the name of the group principal created in step 2]
5. If you wish to run the End2End Security Test, you must also edit
${com.sun.jini.test.home}/src/com/sun/jini/test/impl/e2etest/End2EndTestKerberos.td
and provide a value for the com.sun.jini.test.impl.end2end.kinit
property. The value for this property should be the command that generates
forwardable tickets stored in the local ticket cache for your KDC. Because the
default search path used by the harness does not include this directory, the
search path must be augmented to include the src
directory. This can
be done on the command line by adding the following option:
-searchPath '${searchPath},${com.sun.jini.test.home}/src' |
or in the deployment properties file by adding:
searchPath=${searchPath},${com.sun.jini.test.home}/src |
Note that adding src
to the search path will introduce a noticable
delay to the initialization phase of the harness, but has little impact
during test execution.