DOM Conformance Test Suite, Level 2 HTML

This document

This document describes how to run the DOM Level 2 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.

Overview

The DOM Level 2 HTML Test Suite supercedes the DOM Level 1 HTML Test Suite. 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 2 HTML Test Suite was released on TBD.

Latest Version

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

Distribution

This distribution is organized as follows:

index.htmlThis file
dom2-html-matrix.html A cross reference of the tests to the DOM 2 HTML Recommendation, pointers to the tests and documentation.
ecmascript/level2/html/*.html DOM tests for ECMAScript implementations. Launch tests from ecmascript/level2/html/alltests.html
java/dom2-html.jar DOM tests for Java implementations, includes source code.
java/junit-run.jar A test framework adapter that supports running dom2-html.jar with the JUnit 3.7 test framework.
tests/*.xml Test definitions in XML.
tests/dom2.dtd Document Type Definition for DOM 2 HTML tests.
tests/dom2.xsd XML Schema for DOM 2 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.
java/junit.jar JUnit 3.7. JUnit 3.7 is licensed under the IBM Public License.
ecmascript/jsunit JSUnit 2.0. JSUnit is licensed under the GNU Public License

Running the ECMAScript tests

The DOM TS currently tests HTML and XHTML implementations of DOM Level 2 HTML. It is not necessary to run the Level 1 HTML test suite when checking conformance to Level 2 HTML.

To run the ECMAScript tests, open ecmascript/level2/html/alltests.html in the browser you want to test. Configure the implementation, test document loading parameters and content type and press run.

Running the Java tests

Running the Java tests will require placing an XHTML or HTML parser compatible with DOM Level 3 bootstrapping an DOM Level 3 Load and Save. No such implementation is available at this time.

To run all tests against the default DOM L3 bootstrap parser reading XHTML test files in a default configuration from the JUnit text user interface, run " java -classpath dom2-html.jar junit.textui.TestRunner org.w3c.domts.level2.html.TestDefaultLS". To load HTML test files, specify "-Dorg.w3c.domts.contentType=application/xhtml+xml". 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.level2.html.TestDefaultLS"

org.w3c.domts.level2.core.TestDefaultLSTests the implementation returned by the DOM Level 3 bootstrap in the default configuration.
org.w3c.domts.level2.core.TestDefaultLSAltConfigTests the implementation returned by the DOM Level 3 bootstrap in an alternative configuration.

Feedback

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 © 2001-2004 World Wide Web Consortium, (Massachusetts Institute of Technology, European Research Consortium for Informatics and Mathematics, Keio University). All Rights Reserved. This work is distributed under the W3C® Software License 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.

Acknowledgments

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