DOM Conformance Test Suite, Level 1 HTML

This document

This document describes how to run the DOM Level 1 HTML Test Suite. It also includes pointers to relevant software as well as relevant resources.

The DOM TS has been developed in accordance with the DOM Conformance Test Suites Process Document. For additional information and to download other DOM Test Suites, visit the DOM Conformance Test Suites page.


The DOM Conformance Test Suite consist of a series of tests that have been generated from XML test descriptions, then transformed into the two official DOM bindings, Java and ECMA. In order to run the test suite, we have provided the possibility to run the tests using the JUnit and JsUnit testing frameworks, both included in this distribution.

The DOM Level 1 HTML TS was released on February 13, 2002.

Latest Version

Download the latest version of the DOM Level 1 HTML Test Suite.


This distribution is organized as follows:

index.htmlThis file
dom1-html-matrix.html A cross reference of the tests to the DOM 1 HTML Recommendation, pointers to the tests and documentation.
ecmascript/jsunit/testRunner.html A modified JSUnit test runner. JSUnit is licensed under the GNU Public License
ecmascript/jsunit/app, ecmascript/jsunit/docs, ecmascript/jsunit/images, ecmascript/jsunit/tests JSUnit support files
ecmascript/level1/html DOM tests for use with JSUnit
java/dom1-html.jar DOM tests for Java implementations, includes source code.
java/junit-run.jar A test framework adapter that supports running dom1-html.jar with the JUnit 3.7 test framework.
java/junit.jar JUnit 3.7. JUnit 3.7 is licensed under the IBM Public License.
tests/*.xml Test definitions in XML.
tests/dom1.dtd Document Type Definition for DOM 1 HTML tests.
tests/dom1.xsd XML Schema for DOM 1 HTML tests.
tests/files/ Test documents
doxygen/ Documentation generated by doxygen from the generated Java code. Useful in diagnosing test failures. Click here for a class hierarchy.

Running the ECMAScript tests

The DOM TS currently tests XML and SVG implementations of DOM Level 1 HTML. Later revisions will provide testing of HTML implementation conformance with DOM Level 1.

To run the ECMAScript tests, open the JsUnit test runner in the browser you want to test, press the browse button and look for the file "ecmascript/level1/html/alltests.html". After that, press Run to run all DOM 1 tests compatible with the implementation. If you choose to run individual tests, the above procedure works similarly, just browse for the test you want to run in the "ecmascript/level1/html" directory.

These tests have been run with Microsoft Internet Explorer 5.0 and later for Microsoft Windows and Mozilla 0.9.8 and Netscape Navigator 6.2 and later for Microsoft Windows, Linux and Apple OS X. Use on Apple OS X required replacing colon (:) in the test case name with slashes (/).

To test the DOM implementation of the Adobe SVG Viewer, select "ecmascript/level1/html/svg-alltests.html" and press Run.

For JsUnit reference, please visit the JsUnit home page. JsUnit will provide output with indication on how many tests that were run, how many failed and how many errors were found while running. The error log points to the actual test, so identifying what you need to do in your implementation is simplified.

Running the Java tests

Running the Java tests will require placing a JAXP 1.1 compatible parser on the classpath or placing a common JAXP 1.1 parser (Apache Xerces, Apache Crimson, Oracle XML Developer Kit, or GNUJAXP) in the java/ directory.

Running "java -jar dom1-html.jar" from the java/ directory will write to the console a summary of the parser under test and the results of the tests run in two distinct configurations. The parser under test can be selected by any mechanism supported by JAXP 1.1.

The Java tests may also be run using from JUnit TestRunner's. To run all tests against the default JAXP parser in a default configuration from the JUnit text user interface, run " java -classpath dom1-html.jar junit.textui.TestRunner org.w3c.domts.level1.html.TestDefaultParser". The run the Swing or AWT user interfaces, replace "textui" with "swingui" or "awtui" and add "-noloading" before the test case to not use JUnit's custom ClassLoader, for example, "java -classpath dom1-html.jar junit.swingui.TestRunner -noloading org.w3c.domts.level1.html.TestDefaultParser"

Running "java -jar junit-run.jar" will launch the JUnit SwingUI without the custom ClassLoader.

The following TestSuite's are provided for use within JUnit TestRunner's. These provide the only mechanism for testing implementations that do not support JAXP 1.1 such as Batik or DOM4J.

org.w3c.domts.level1.html.TestBatikTests the Apache Batik SVG project (currently fails loading test documents).
org.w3c.domts.level1.html.TestCrimsonTests the Apache Crimson Parser in the default configuration.
org.w3c.domts.level1.html.TestCrimsonAltConfigTests the Apache Crimson Parser in an alternative configuration.
org.w3c.domts.level1.html.TestDefaultParserTests the current JAXP 1.1 Parser in the default configuration.
org.w3c.domts.level1.html.TestDefaultParserAltConfigTests the current JAXP 1.1 Parser in an alternative configuration.
org.w3c.domts.level1.html.TestDOM4JTests DOM4J.
org.w3c.domts.level1.html.TestGNUJAXPTests the GNUJAXP Parser in the default configuration.
org.w3c.domts.level1.html.TestGNUJAXPAltConfigTests the GNUJAXP Parser in an alternative configuration.
org.w3c.domts.level1.html.TestOracleTests the Oracle XML Parser in the default configuration.
org.w3c.domts.level1.html.TestOracleAltConfigTests the Oracle XML Parser in an alternative configuration.
org.w3c.domts.level1.html.TestXercesTests the Apache Xerces Parser in the default configuration.
org.w3c.domts.level1.html.TestXercesAltConfigTests the Apache Xerces Parser in an alternative configuration.


We look forward to your comments. The DOM TS Group communicates primarily through the DOM TS mailing list (archive).

Tests in this table are released under the W3C Software Copyright Notice and license:
Copyright (c) 2002 World Wide Web Consortium, (Massachusetts Institute of Technology, Institut National de Recherche en Informatique et en Automatique, Keio University). All Rights Reserved. This program is distributed under the W3C's Software Intellectual Property License. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See W3C License for more details.


The DOM TS was jointly launched by the W3C and NIST. It is, however, a publically developed and open framework. Reaching the point of being able to finalize and release the DOM TS would not have been possible were it not for the contribution from several people in the developer community, especially Curt Arnold and Fred Drake.

Mary Brady, NIST representative
Dimitris Dimitriadis, DOM TS Representative for the W3C DOM Working Group
Philippe Le Hégaret, DOM Activity Lead