Since the test automation is written in Java, you must build it before running
any tests. Like Xalan-J, we use Ant build.xml files as 'makefiles' to build the
project. A copy of the Ant runtime files is provided in the xml-xalan/java/tools directory if you
need them; you may also use your own copy of Ant if you have it installed.
Unless specifically noted, all testing code should work either on Windows or
UNIX systems; adjust .sh/.bat and path\separators/as needed. Note that paths
in .properties files may always use forward / slashes since Ant's path
handling will always do the proper thing.
This assumes you already have a version of Xalan-J in \builds\xml-xalan\java
This may either be a distribution or a copy you pulled from CVS and built yourself.
Download the tests to \builds\xml-xalan\test.
cd \builds\xml-xalan\test
build jar
This calls build.bat/.sh to find a copy of ant.jar and an
xml parser (which Ant requires). It then calls Ant to run the 'jar' target in the
default build.xml file. This will compile all the base test reporting libraries and
framework, as well as the most common test drivers and API tests.
The default way to build and run the tests assumes you have both the xml-xalan/java
and xml-xalan/test directories locally, as if you were a developer on xalan. See below
for a simple alternate way to set your classpath using JARDIR. This allows QE/QA/test
people to run the same set of tests quickly against different versions of the product.
| Using JARDIR is no longer fully supported due to lack of
interest. Those wishing to manage custom classpaths are welcome
to submit patches to allow this in an automated fashion. |
The default jar target builds all TestletDrivers and most of the tests.
A few kinds of tests require separate targets to compile since they have
extra dependencies. In particular, any XSLTC-specific API tests or
TransformWrapper subclasses are compiled in a separate set of targets.
Users of automated IDE's that automatically compile all *.java files
in the source tree will either have to use the Ant build.xml script or may
have to manually compile certain files with the extra dependencies. Note that
JUnit is only required for the special qetesttest directory, which is only used to
test the qetest framework itself and is not needed to test Xalan.
Note that there are a few precompiled .class files in the test/java/src/ area.
By default these are simply copied into the testxsl.jar for you. These are files
that require extra dependencies to compile, and change infrequently, so as a
convenience they're checked in to the repository as precompiled .class files as well as source.
Building the Javadocs for the tests is done by build.bat javadocs
, and
is best done under JDK 1.2.2 or higher - they will build with JDK 1.1.8, but not
all the links will work properly.
Building these top-level documents in the xdocs directory can
be done with build.bat docs
and must be done under JDK 1.2.2 or higher,
since the Xalan-related stylebook code that we use requires that.