XForms Test Suite README -- Tester

What is this?

This "test suite" is a collection of miscellaneous tests developed as test cases over some time, mostly by me. It is not meant as a replacement for the official W3C XForms Test Suite, but as an addition used for developing the XForms Extension for Firefox.
That said, I am trying to automate the tests as much as possible, which the official test suite does not allow (yet).

Directory structure

Structuring test suites is a science in itself -- and I do not think I excel in it :) I've tried to structure the tests under the XForms control that they are testing, but also have "bonus" stuff such as XPath, MDG, etc.

How to run the tests

Actually running the tests is quite simple. You just click on the test you want to run :) But it is possible to run the tests in two modes, and to give a couple of parameters to them.

Running test individually

To run the tests individually, you just click on the test you want to run. If the test includes automated testing (not all for now), a red message box will appear in the bottom of the page if something fails. You can add different parameters to the test run to show debug information, add event observing, etc. The parameters are added to the URI string.
For now the possible parameters are:
ParameterDefaultDescription
tests 1 Turns the test harness off or on. The test harness is not rock solid, and might have unwanted side-effects, so if you want a pure XForms form set this parameter to 0.
debug 0 Turns on debugging information. This will list all the tests being run by the test harness.
observe 0 Add an event-observer to the bottom of the page, showing some of the events that read the document node. This will also show the page load time.

Running tests automatically (using JsUnit)

It is also possible to run a part of the test suite automatically using JsUnit). This way it is easy to get an overview of how many tests fail, and/or have changed status.
To run the tests choose the "[JsUnit run]" on the front page.

FAQ

Why do I keep getting a trillion popups when running the tests in JsUnit?
You need to set the about:config variable xforms.disablePopup to true
Can I see what tests are being performed?
Yes, just add a debug parameter to the URI. Like this.
Why do I get an an Error: cont.getXFormsAccessors is not a function?
You must be running an old version of the XForms Extension. You need to run at least version 0.4.

Requirements

  • Firefox 1.5.0.1+ or SeaMonkey 1.0+, with Mozilla XForms extension 0.4+