Work in progress, will be updated in parallel with the building process acquiring more options. Please check back regularly for updates. For comments, please send mail to the DOM TS mailing list.
This is preliminary (2003-02-12) documentation on how to build the DOM Test Suite. It explains the most typical use case and will include instructions on how to build other adapters in the near future.
All test files necessary to generate the DOM TS are on the W3C CVS repository in a publically available hierarchy, allowing for anonymous checkout.
In order to do this, you need to set the following in your environment:
First, log on
When prompted for a password, give
Check out the entire DOM-Test-Suite branch (or any part thereof you're interested in).
cvs checkout 2001/DOM-Test-Suite
After checking out the source, log out of CVS.
You will need the following software to build the DOM TS (the Java and ECMA Script code, the DOM TS Markup Language in W3C Schema and DTD form.
You will also need the following softwares to generate SVG DOMTSML which is experimental:
Make sure you have included
apache-ant-<version>/bin — and optionally
sed and patch — in your
PATH and set
> echo %PATH% C:\Program Files\Apache.org\apache-ant-1.6.1\bin;[...] > echo %JAVA_HOME% C:\Program Files\Sun\j2sdk1.4.2_04
> echo $PATH /usr/local/apache-ant-1.6.1/bin:[...] > echo $JAVA_HOME /usr/local/j2sdk1.4.2_04
Any Java VM 1.1 or later should work.
Make DOM-Test-Suite the current directory (or, if you just want to test the build, copy all files from the DOM-Test-Suite directory to a location of your choosing) and do:
to see what options you have to build the DOM TS.
The tasks you will probably most oftenly use are:
with the possible choices:
The builds take approximately 10 minutes each and begin by Ant downloading the DOM specifications from the W3C server. Please make sure that you have a proper internet connection.
Ant will generate the following directories (all within the current directory):
There are more than one ways to run the DOM TS. If you have built the test suite following the instructions in this document, you will be most interested in running it with JUnit and JsUnit, respectively. There are also adaptors for Avalon, if you prefer this framework (instructions on how to run the test suite using Avalon will be added shortly).
First, make sure to have Junit on your system by running the following command:
You need to generate a jar file from the test suite. For example, to generate the jar file for DOM Level 2 Core tests:
Make sure to have the appropriate interfaces for the DOM
module you're testing in your
Then go in the
build directory, and install your
DOM implementation there (by copying it in the directory if
it's a JAXP-compliant or DOM Level 3 Core-compliant
implementation), or by adding it in the
CLASSPATH. At this stage, you build directory
looks like as follow:
dom2-core-interfaces.xml dom2.dtd junit.jar dom2-core.jar java xercesImpl.jar dom2-interfaces.xml junit-run.jar xml-apis.jar
Finally, run the tests:
java -jar dom2-core.jar
The output will give you a clue as to what goes wrong, for which test, and so on (check an example of output). This has been tested with Xerces, Crimson and XMLParserv2.
jsunit.zip from http://www.jsunit.net and
place it in the
You need to generate the tests from the test suite. For example, to generate the jar file for DOM Level 1 core tests:
Open the file
testRunner.html from the
directory in the user agent that you would like to test. Using
the "browse" button, select the file you want to test in the
directory and run it in JsUnit. You can also use the file
alltests.html in the same directory if you want
to run all the tests. You will see an error log after the run.
We will organise the contents for easier accessibility before release. All folders carry fairly self-evident names; if you want to browse the stylesheets that are used, go to transforms, if you want to look at the XML test source files, go to tests, and so forth.
If you build the DOM Test Suite, bear in mind that it has not been officially released; you can and should therefore not use the results to make any claims as far as DOM conformance is concerned. The DOM TS will be officially released shortly, in the meanwhile we welcome your comments to the DOM TS mailing list.