prototype DOM TS Level [1|2] [Core|HTML]

I have a "prototype" of the DOM TS for Level 1 Core,
Level 1 HTML, Level 2 Core, and Level 2 HTML which uses a
patched JsUnit 1.3.3, allows user selection of
implementations, content types, implementation attributes
and test selection and which can be run either from the web
or a local file system.  The Level 1 and Level 2 HTML tests
include .xhtml versions of the xml data files for use in
testing xhtml.

Please test and review this for usability and for support in
as many browsers and operating systems as possible.

Known Issues
============

JsUnit has a slight bug in that a variable name
is misspelled in jsUnitTestManager.js.  I will submit a patch
to Edward as soon as I look into some other issues.

Opera 7.x is not supported. More work needs to be done
to determine if it is possible to support Opera 7 in
it's current implementation. I believe that recent
security changes to Opera 7.01 may preclude it's support
even if the other issues in Opera 7.00 are resolved.

IE will fail all native implementation tests for
text/xml and application/xhtml+xml content. This
is due to IE's failure to natively support raw
text/xml or application/xhtml+xml content types.

IE will fail all MSXML implementation tests for
application/xhtml+xml even though the content is valid
XML due to it's lack of support for application/xhtml+xml.

Although you can select text/html or application/xhtml+xml
for the DOM Level 1 Core tests, there is not a corresponding
html or xhtml document available for each XML data file.
There are hc_staff.html, hc_staff.xhtml files however these
do not appear to be properly a part of the DOM Level 1 Core.
I would like to inquire as to whether the hc_staff tests
belong in DOM Level 1 Core.

Several HTML tests are subject to case sensitivity
issues which cause failures when run as text/xml or
application/xhtml+xml.

The lack of full specification of the implementation
attributes for each test makes it unclear to me what the
default implementation attribute values are for the
"undefined" cases.

More work needs to be done to determine the best approach
to creating the alltests.js for each DOM Test Suite,
packaging and location of the do-tests.html and
new-alltests.html files which could be modified to be
shared between each Test Suite and copied into the final
directories during the build.

Availability
===============

* download tar ball containing entire DOM-Test-Suite
   directory as downloaded 02-28-2003 from anonymous pserver

   http://dom-ts.bclary.com/DOM-Test-Suite.tar.gz

* Run online

   http://dom-ts.bclary.com/build/

* Browse the full tree online

   http://dom-ts.bclary.com/

* Browse the tests

   http://dom-ts.bclary.com/build/ecmascript/

Browser Support
===============

Windows 2000:

fully supported -

Mozilla trunk, Netscape 7.x, Internet Explorer 5.5 and 6
Note that Netscape 7.x is considerably slower than recent
Mozilla trunk builds but will complete the tests if
given enough time.

not supported -

Opera 7.00 does not load the test documents and Opera 7.01
throws a security error. More work is required to
investigate why Opera does not run the test suite. Opera
will run the normal JsUnit standard tests although not the
native IFRAME based loader.

Mac OS X

fully supported -

Mozilla trunk and Netscape 7.x

Linux:

fully supported -

Mozilla trunk and Netscape 7.x

Installation
============

Web based
----------
Download the tarball and untar into a new directory
(e.g. DOM-Test-Suite) in your web server's DocRoot.

Make sure your web server supports the following mime types:

xml   text/xml
html  text/html
xhtml application/xhtml+xml
svg   image/svg+xml

Note that the tar ball contains an .htaccess file for Apache
which defines these mime types.

File based
----------
Download the tarball and untar into a new directory
(e.g. DOM-Test-Suite) somewhere on your computer.


Running the DOM Test Suites
===========================

Test results may depend upon cache settings.

You may or may not wish to disable Java for the
duration of the tests.

Internet Explorer will need the MSXML 3 or MSXML 4
Active X controls (for XML) and Adobe SVG plug-in
(for SVG) installed and have Active X enabled
in the security zone where you have hosted the tests.

Netscape 7.x/Mozilla will need to have popup windows
enabled for the domain where the tests are hosted.

1.  Open the index.html file in the build/ directory.

2.  Click on the Test Suite you wish to run:
     i.e. DOM Core Level 1, DOM HTML Level 1,
     DOM Core Level 2, or DOM HTML Level 2.

3. Select an implementation to test.

    Mozilla/Netscape 7 support the Native implementation
    for all tests and content types.

    Internet Explorer supports Native, MSXML3, MSXML4
    (if installed) and Adobe SVG plug-in (if installed).

4. Select the Test Implementation Attributes.

   Several tests contain implementation attributes which
   specify the qualities of parser which is required
   in order to properly parse the data document.

   You can select matching tests by choosing

   "Any" which will match any setting of the particular
   implementation attribute

   "undefined" which will only match tests which do not
   have the specific implementation attribute set

   "true" which will only match tests which have the
   specific implementation attribute set to true

   "false" which will only match tests which have the
   specific implementation attribute set to false.

   Currently, only Internet Explorer MSXML implementations
   support setting the parser to validating and
   ignoringElementContentWhitespace.

   Tests which do not meet the specified implementation
   attributes you select will be skipped and will be
   reported using JsUnit's tracing warn facility.

5. Select the Content Type to be used for selecting
    data files to be loaded.

    For DOM Core 1 and DOM Core 2 supported content types
    are text/xml and image/svg+xml.

    For DOM HTML 1 and DOM HTML 2 supported content types
    are text/xml, application/xhtml+xml and text/html.

    Tests which require files which do not exist in the
    requested content type will be skipped and will be
    reported using JsUnit's tracing warn facility.
    (except for xhtml in the DOM Level 1 Core).

6. Select either the full set of tests or a single
    individual test and click the Initialize JsUnit
    button.

7. In the window which opens with JsUnit, click Run.

Implementation Details
======================

The basic changes required were to DOMTestCase.js,
test-to-ecmascript.xsl and test-to-jsunit.xsl. Minor
changes were also made to build.xml in order to copy
the temporary versions of some of the files. The
*alltests.xml are not used and are instead replaced
with a JavaScript file which contains information on all
tests, the files used and the specified implementation
attributes. This script is used to generate the list
of tests in each do-tests.html file and is used to
populate the JsUnit suite for the new-alltests.html file.
The different types (html, xml, svg) alltests files
are no longer required since selection of content type
is handled via the user.

The current versions of the alltests.js files were
constructed manually however would be best generated
as a result of an XSL transform.

Conclusion
==========

I believe this approach fulfills the promise of a browser
agnostic test suite which all manufacturers have an equal
chance of supporting.

Thanks,
/bc

Received on Tuesday, 4 March 2003 13:47:45 UTC