XTest Server
Author: Libor.Martinek (libor.martinek@sun.com )
Last updated: February 12, 2003
- Content:
- Installing XTest Server
- Content of XTest Server directory
- Configuring XTest Server
- Running tests
- Starting and stopping XTest Server
Installing XTest Server
XTest Server scripts are in open-source CVS in module xtest in
directory server/bin. There is also directory server/conf.samples,
which contains examples of configuration files. Scripts are shell
script which runs on all unixes. To run XTest Server on Windows, you
can use e.g. cygwin. When running XTest Server on cygwin, write all
pathes with slash (
c:/jdk1.3.1), not backslash (
c:\jdk1.3.1).
- Copy directory server
to machine where you want test.
- In this directory create empty directory
conf.
- Copy
site-properties file from conf.samples
to conf.
- Edit
site-properties in directory conf.
See chapter Configuring XTest Server - Site
properties.
- Create driver config file. See chapter Driver Property File in
document XTest
Driver Description.
- Create testconfigs. See chapter Configuring
XTest Server - Testconfig
- Unzip xtest-distribution.zip to directory
xtest-dist.
- Start xtest server. See Starting and
Stopping XTest Server.
Content of XTest Server directory
XTest Server directory contains following directories and files. Items
in
italic are created during testing.
- bin
- xtestServer.sh - server script
- testBuild.sh - script for
testing one build, called from runTestingServer.sh
- build.xml - driver
wrapper
- runTests.sh - script which
execute driver with all necessary properties
- set_xtesthome - small script which sets
XTEST_SERVER_HOME
- timeout.sh - script for
checking time of testing
- killtree.sh - kill process tree
- mail.sh, mail.xml - scripts for sending
mail
- conf
- site-properties - shell
script with site properties
- driver-xxx.properties - driver properties
- testconfig_xxx - test configs
- xxx.testconfigs - list of
testconfigs
- xtest-dist - xtest distribution
- cvs_xxx - test sources checked out from CVS
- logs - directory with logs
- out_testconfig_xxx.log - output from last
test with this testconfig
- build-info -
directory with last build-info files. This
files are used for determining whether last build was already tested.
- ide - tested ide
- results - xtest result directory
- work - xtest working directory
Configuring XTest Server
All configuration files are in directory
conf.
Site properties
Properties for one machine is in file
site-properties,
which is shell script. See
example.
Global properties:
ANT_HOME - ant home directory
SHIP_RESULTS - where to copy results
TEST_CONFIG_LIST - file with list of testconfigs
which should be executed by xtest server
XTEST_MAILxxx - properties used for sending mail
HOST_NAME - name of machine
Properties used in testconfig:
These properties are used only in testconfigs. You can change them
(name, value, number), but then change also testconfigs.
JDK13_HOME, JDK14_HOME - where jdk1.3 and jdk1.4 are
installed
BUILDS,... - directories with builds
Testconfig
Testconfig is set of properties used for testing one build. It says
which build is tested, on which jdk, which driver properties to use
etc. See
example.
Mandatory properties:
LAST_BUILDFILE - points to zipfile with build which
is used when testing last build.
OLD_BUILDFILE - points to zipfile with build which
is used when testing build with concrete number. To construct this
property use property BUILD_NUM, which contains
build number.
BUILDINFO_PATH - path inside zip where build_info
file is located.
DRIVER_CONFIG - path to driver config (driver
properties) used for testing this build
JAVA_HOME - where is java installed. You can
predefine e.g. JDK13_HOME and JDK14_HOME properties
in site-properties and used them here.
Optional properties:
LAST_NBMSFILE - points to zipfile with NBMS
which is used when testing last build.
OLD_NBMSFILE - points to zipfile with NBMs which is
used when testing build with concrete number. To construct this
property use property BUILD_NUM, which contains
build number.
WARNING_TIME - after how much time warning mail
should be send if build is still tested.
PROJECT_NAME - project name. If not specified,
project name from driver config is used.
TESTED_TYPE - tested type. If not specified, tested
type from driver config is used.
DRIVER_ARGS - additional arguments for xtest
Driver config
This file is described in chapter Driver Property File in document
XTest Driver
Description.
Running tests
To one-shot test of one build, use
testBuild.sh.
testBuild.sh [-n build_number | -last | -new_only ]
[testconfig_1]...
If you want to test build with concrete number, use parameter
-n.
Then testconfig's property
OLD_BUILDFILE is used to get
tested build.If you want to test last build, use parameter
-lastand testconfig's
property
LAST_BUILDFILE is used to get tested build.
Parameter
-new_only is same as
-last
with exception that only build which wasn't tested before is tested. To
determine whether build was already tested is used 'build_info' file
which contains build number of last tested build. 'build-info' files
are created only when testing with
-new_only parameter so
it means that builds tested with
-n or
-last
parameter aren't counted as tested for use of
-new_only
parameter. Parameter -new_only is
default option if you
doesn't use any of these parameters.
Next parameter(s) may be testconfig(s) to use for testing. If none
testconfig is specified then all testconfig defined in property
TEST_CONFIGS
(defined in file site-properties) is used. If only name of testconfig is
used, then this testconfig is searched in conf directory.
testBuild.sh without parameters is used in
xtestServer.sh,
so it means, than only new builds is tested with testconfigs from
property
TEST_CONFIGS.
Examples:
testBuild.sh -n 200206040100 testconfig-nb-dev-dev-jdk13
testBuild.sh -last testconfig-nb-dev-dev-jdk14
testconfig-ffjce-trunk-qa-jdk14
testBuild.sh -new_only ../conf/testconfig-nb-dev-dev-jdk14
testBuild.sh -n 200206040100
Starting and stopping XTest Server
To control xtest server, use
xtestServer.sh with one
argument. This argument has to be one of these:
- start - for starting server
- stop - for stopping server. Server will be stopped when
testing of current build is finished. It may take long time.
- kill - for killing server immediately. It may happen that
some processed will not be killed. In this case you have to kill them
manually.
- status - for printing current status (running, not
running, stopping).