This section provides extended examples of command-line operations.
To use the following examples on your system, you must use class paths and directory names appropriate for your system.
java -jar lib/javatest.jar -verbose -testSuite /tmp/
myts \
-workdir -create /tmp/
myworkdir -config /tmp/
my.jti \
-runtests -writereport /tmp/report
This combination of commands does the following, in this order:
/tmp/
myts
/tmp/
myworkdir
.jti
as the configuration settings
/tmp/report/
after test execution
java -jar lib/javatest.jar -startHttp -testsuite /tmp/
myts \
-workdirectory /tmp/
myworkdir -config /tmp/
my.jti \
-runtests -writereport /tmp/report -set
tck.foo.bar 4096 \
-runtests -writereport /tmp/
report1
This combination of commands does the following, in this order:
/tmp/
myts
/tmp/
myworkdir
.jti
as the configuration settings
/tmp/report/
after test execution
/tmp/
report1
java -cp lib/javatest.jar:lib/comm.jar \
com.sun.javatest.tool.Main \
-Especial.tck.value=lib/special.txt \
-agentPoolPort 1944 -startAgentPool "testsuite /tmp/
myts ; \
workdir /tmp/
myworkdir ; config
myconfig.jti ; runtests"
This combination mixes two styles of command line arguments (quoted and
dash-style). It invokes the harness by class name, rather than executing the
JAR (-jar
) file. An extra item is added to the JVM's classpath. The following commands are given to the harness:
/tmp/
myts
/tmp/
myworkdir
.jti
java -jar lib/javatest.jar -config
foo.jti -runtests
This relies on information in the JTI file to do the run. Specifically, it tries to use the work directory and test suite locations specified in the JTI file. If either of those are invalid or missing, the harness reports an error. Otherwise, if the configuration (in the JTI) is complete, the tests are run.
java -jar lib/javatest.jar -config
foo.jti -verbose \
-set tck.val1 2002 -runtests
This is the same as Example 4 with the exception that it turns on verbose mode and changes the answer of one of the questions in the configuration.
java -jar lib/javatest.jar -config
foo.jti \
-priorStatus fail,error -timeoutFactor 0.1 \
-set tck.needColor Yes \
-set tck.color1 orange -tests api/java_util -runtests
This example extends Example 4 by setting various Standard Values and the answer to particular configuration questions.
Example for starting the GUI:
java -jar lib/javatest.jar -testsuite /tmp/
foo.jti
myts \
-workdirectory /tmp/
mywd -config /tmp/
myconfig.jti
This combination of commands does the following, in this order: