This document explains in step by step fashion how to run Jini QA tests. A Jini QA test is a class that implements the com.sun.jini.tck.harness.Test interface and is thus able to run inside of the TCK (Technology Compatibility Kit) test harness. In general, a Jini QA test will test either a service (such as Lookup Discovery Service) or a utility (such as Client Lookup Manager or Join Manager). For more information refer to the "How to Write a Test" document.
In order to run tests you will need access to an installation of TCK 1.0B
as well as the QA Methodology Framework software. There is an
installation of TCK 1.0B located in the installation directory
/net/jini/files/web/qa/tck/jinitck1_0B. Alternatively, you may install
the TCK software on your own drive and use that. You will need to start
up rmid (if your tests require it) as the framework will not do this for
you. The Runner (the TCK test harness) starts up a class server on port
8080 which serves up class files from the TCK's /lib directory under the
installation directory. It is essential that any class server that you
start use a port number other than 8080 otherwise, the harness will throw
an exception. The QA Methodology Framework software is located in
/vob/qa/jars/QATestUtil.jar. You may need to perform a gmake on the qa
vob if you have not already done so. In order to successfully perform a
build in the qa
vob you must have previously performed
successful builds in the jive
and tck
vobs.
$HOME/qatest
.$HOME/qatest
if you are not already there./vob/qa/src/com/sun/jini/qa/harness/examples/run_sampleutilitytest
The qatest.prop file that you copied to the $HOME/qatest directory has a property called qatest.debug which is set to true. This causes additional output to be generated by the framework when starting and stopping services. This extra information is useful for debugging purposes. You can stop this output by either commenting out the assignment of the qatest.debug property or by setting the value of the qatest.debug property to false.
At the end of the output you should see the following text:
Test Passed: Success -> Proxy joined lookups as expected.
/vob/qa/src/com/sun/jini/qa/harness/examples/run_sampleservicetest
At the end of the output you should see the following text:
Test Passed: Success -> Transaction isolation is verified.
run_qatest
shell script
The run_qatest
shell script is provided to help make running
Jini QA test easier. The usage statement for the script follows:
Usage run_qatest -tests -categories [-prop -policy -cp -jdk]
qatest -test com.sun.jini.test.harness.examples.ServiceUtilityTest -categories joinmanagerIn practice, if you plan to override many of the defaults, you will want to create your own shell script wrappers. See the run_sampleutilitytest and run_sampleservicetest scripts for examples.
The following procedure assumes that the environment has been set up
correctly and rmid
and a class server are running. It also
assumes that your test(s) are compiled and reside under /vob/qa/classes
$HOME/qatest
if you are not already there.run_qatest -tests com.sun.jini.test.myarea.MyTest -categories myCategory -cp /vob/qa/classesYou may also define any parameters that you might put in a Properties file on the command line. For example:
run_qatest -tests com.sun.jini.test.myarea.MyTest -categories myCategory -cp /vob/qa/classes -qautil.debug trueWill turn on debugging information in the QA Methodology Framework code.