The XQuery/XPath 3.* Test Suite (QT3TS) provides a set of tests designed to demonstrate the interoperability of W3C XML Query Language, version 3.0 and W3C XML Path Language implementations.
The test suite currently contains over 26,000 test cases.
The tests are published as a set of files, mostly in XML format. W3C does not supply a test driver for executing the tests; you will have to write your own. Some implementors, however, have made their test drivers available as part of the download, and you are welcome to use these as a baseline for developing your own drivers.
The metadata for each test indicates its dependencies. These include the specification(s) exercised by the test (some subset of XPath 2.0, XPath 3.0, XQuery 1.0, and XQuery 3.0), as well as dependencies on optional features which implementations may or may not support (such as formatting of dates using English-language month names). The idea is that if your implementation does not support an optional feature, you should not run the tests that require that feature.
Very many of the QT3 tests were converted automatically from tests in the older XML Query 1.0 test suite. There are several changes in approach:
To enable tracking of test history, including controversies that may have arisen in the past about the correctness of test results, all test names of XQuery 1.0 tests have been retained unchanged.
Currently the test suite is work in progress. There are no versioned releases, instead the tests are continuously updated in the CVS repository. This will change as the specifications themselves stabilize, at which point snapshots of this test suite will be frozen and given version numbers.
Users of the test suite are strongly encouraged to provide feedback via the Bugzilla bug database. A goal of the test suite is to discover areas where the language specification is unclear, and where implementations can therefore produce results that are different from those published; where this occurs, the Working Group will examine the issue, and decide whether to make the specification more prescriptive, or to change the test case to allow alternative results.
At the time of writing (January 2013), QT3TS contains over 25,000 test cases, and these are believed to cover most areas of the specification; the area where coverage is weakest is serialization. Working Group members and others are continually adding new tests.
Change control is currently informal. Anyone with CVS write access is able to submit new tests without formality, and these become part of the test suite unless challenged by means of a bug report. Existing tests should not be changed until there has been discussion of the change among interested parties (typically including the test author), but individuals are responsible for deciding whether changes are sufficiently controversial to merit discussion by the full Working Group. However, any user of the tests has the right to challenge new or changed tests and ask the relevant Working Group(s) to make a formal decision.
The test suite contains a catalog that contains general information on the test suite as well as test descriptions for each of the test cases included in this release. Test queries and assertions about the expected results are contained in the catalog, or in some cases in files referenced from the catalog.
The tests are organised into a number of groups, each with its own naming conventions.
There is a master catalog, catalog.xml
, that contains references to subsidiary
catalogs, one per test area, organized in directories as above. There are some additional directories:
Implementors are encouraged 1) to write a harness for this test suite and to test their implementations and 2) to report their results to the XML Query Working Group. All of these areas are discussed in greater detail in the documents referenced below.
See the following documents:
Version | Date | File |
1.0 | 21st June 2013 |
The primary documentation of the test suite (alongside this document) is the schema for the catalog and test-set files, which is found at catalog-schema.xsd. If viewed directly in an XSLT-capable browser, the schema is rendered automatically into HTML. In case this mechanism does not work, a pre-rendered version of the HTML is at catalog-schema.html. (In many browsers the pre-rendered form is more readable).
Copyright © 1994-2013 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C liability, trademark, document use and software licensing rules apply. Your interactions with this site are in accordance with our public and Member privacy statements.