W3C home > Mailing lists > Public > www-dom-ts@w3.org > March 2001

DOM tests definitions (Was: C language binding)

From: Martijn Pieters <mj@digicool.com>
Date: Fri, 16 Mar 2001 22:49:48 +0100
To: Mary Brady <mbrady@nist.gov>
Cc: www-dom-ts@w3.org
Message-ID: <20010316224947.A13193@zopatista.com>
On Fri, Mar 16, 2001 at 03:37:36PM -0500, Mary Brady wrote:
> I've been working on taking the DOM Level 1 tests,
> written in Java and ECMAScript, and defining the
> test scenarios using XML.  I've already written a
> stylesheet to take the test scenario's file and translate
> them into a set of Java methods to test a variety of
> interfaces.  Next, I'm going to try to
> write a stylesheet to produce ECMAScript tests --
> if I can get this to work, I feel fairly confident that
> we could do the same for any other bindings, so that
> we would have one set of common test scenarios, and generated tests for each
> binding.  I'll forward real
> examples early next week, but the basic idea is to set up
> a set of ENTITY definitions for each binding and a
> conditional include that toggles between various bindings.

Will this scheme allow for inheritence of interface tests?

The DOM API defines specific interfaces, but implementations work with
objects that implement these interfaces. Most (all) test suites that I
have seen only test for one interface per object, and that in a limited

So, when handed a CDATA Node, generally only the CDATA Node interface will
be tested for, and the Text Node, the CharacterData and Node Interfaces
are usually neglected.

However, I have built our test suite to follow the interface inheritence
tree. So, for any given Node type, *all* methods that it should support
are tested for. This has proven to be invaluable for unearthing obscure
bugs in DOM implementations; often what seemed a nice optimalisation to
the developer turned out to be creating a bug that would only come out on
certain Node types.

Martijn Pieters
| Software Engineer  mailto:mj@digicool.com
| Digital Creations  http://www.digicool.com/
| Creators of Zope   http://www.zope.org/
Received on Friday, 16 March 2001 16:50:02 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:37:11 UTC