![]() |
The NIST XQuery test suite covers the majority of the functions and operators("fn" and "op" namespaces) defined in the W3C XQuery 1.0 and XPath 2.0 Functions and Operators Working Draft. There is a total of 1880 tests in this release, which are summarized in report.html. This report is included in the distribution under the "files" directory. Functions and operators coverage in this release are summarized in here. Work is underway to merge this testing project with the W3C XQuery working group testing efforts, and we expect this test suite to be a major component of the official W3C test suite. This release superseeds the prvious release.
The test suite is accompanied by a master XML file. This file is included in the distribution and can be found under the "files" directory. It is compliant with this schema, which was developed by members of the W3C XQuery Working Group. The "NIST" directory contains two subdirectories, "functions" and "operators", which in turn are further subdivided into directories, whose name corresponds to the test category being evaluated by the tests contained in it (subdirectories under the "operators" directory are empty for this version of the suite). The "report.html" is a human readable report of the generated tests, including a brief description of each test and the specification's section where the function/operator is described. The tests and supporting documentation (including this file can be found at xmlQuery.zip. The "description" elements in the catalog file are identical for this release of the suite. We felt that since the framework may still change in the future and the tests are atomic in nature, leaving the "description" elements identical is a prudent course of action at this time.
The tests were automatically generated and thus a new identical set can be regenerated. We developed methods to automatically read the Functions and Operators specifications and generate a function/operators signature definitions XML set, which contains the functions and operators signature. A category is also assigned to each signature. All documentation, including the catalog file were automatically generated too. The utility used to automatically generate tests and documentation is a java based application and will be released at a later time as a few minor details are corrected. We also want to add a number of features not yet available.
The tests are of an atomic nature. A function signature is read from the functions definitions file and its arguments type are examined. A value set (generated from our schema test generator) is then used to assign values to the arguments based on its type. General type arguments(such as "item") are further decomposed into more atomic types (integer, int, short, etc) and tests are generated for those atomic types. Each test invokes the type constructor for the particular argument data type in order to ensure the function's ability to handle the appropriate data type. The value set contains boundary values (upper bound, lower bound, and a midrange value). This particular set of values render tests with argument values for strategic domain boundaries. The function/operators argument values are permutated in such a way that each argument is assigned a value from all boundary areas (upper, lower, midrange). This, however, is not a full permutation of argument types/values as this can result in an astronomical set of tests. There is no input/output data for this initial set of tests, though we do have plans to generate such tests at a later time. The tests are independent of each other and can be excuted either individually or as a set.
At this time no expected results are produced. As implementations support more features, a set of expected results will be collected and released.
Category | Covered Functions |
---|---|
NumFunc | op:numeric-add op:numeric-subtract op:numeric-multiply op:numeric-divide op:numeric-integer-divide op:numeric-mod op:numeric-unary-plus op:numeric-unary-minus op:numeric-equal op:numeric-less-than op:numeric-greater-than fn:floor fn:ceiling fn:round fn:round-half-to-even fn:number |
ErrorFunc | Not coverage for this release. |
NameURI | op:QName-equal fn:get-local-name-from-QName fn:get-namespace-from-QName op:anyURI-equal |
StringFunc | Not coverage for this release. |
String | Not coverage for this release. |
CollateFunc | Not coverage for this release. |
Boolean | fn:boolean op:boolean-equal op:boolean-less-than op:boolean-greater-than fn:not |
DateTimeFunc | op:yearMonthDuration-equal op:yearMonthDuration-less-than op:yearMonthDuration-greater-than op:dayTimeDuration-equal op:dayTimeDuration-less-than op:dayTimeDuration-greater-than op:dateTime-equal op:dateTime-less-than op:dateTime-greater-than op:date-equal op:date-less-than op:date-greater-than op:time-equal op:time-less-than op:time-greater-than op:gYearMonth-equal op:gYear-equal op:gMonthDay-equal op:gMonth-equal op:gDay-equal fn:get-years-from-yearMonthDuration fn:get-months-from-yearMonthDuration fn:get-days-from-dayTimeDuration fn:get-hours-from-dayTimeDuration fn:get-minutes-from-dayTimeDuration fn:get-seconds-from-dayTimeDuration fn:get-year-from-dateTime fn:get-month-from-dateTime fn:get-day-from-dateTime fn:get-hours-from-dateTime fn:get-minutes-from-dateTime fn:get-seconds-from-dateTime fn:get-timezone-from-dateTime fn:get-year-from-date fn:get-month-from-date fn:get-day-from-date fn:get-timezone-from-date fn:get-hours-from-time fn:get-minutes-from-time fn:get-seconds-from-time fn:get-timezone-from-time op:add-yearMonthDurations op:subtract-yearMonthDurations op:multiply-yearMonthDuration op:divide-yearMonthDuration op:add-dayTimeDurations op:subtract-dayTimeDurations op:multiply-dayTimeDuration op:divide-dayTimeDuration fn:adjust-dateTime-to-timezone fn:adjust-dateTime-to-timezone fn:adjust-dateTime-to-timezone fn:adjust-dateTime-to-timezone fn:adjust-time-to-timezone fn:adjust-time-to-timezone |
Position | fn:implicit-time-zone |
SeqFunc | fn:subsequence fn:subsequence fn:empty fn:exists fn:distinct-nodes fn:distinct-values fn:min fn:sum fn:count fn:avg fn:max |
Docs | Not coverage for this release. |
IDref | Not coverage for this release. |
BinaryType | Not coverage for this release. |
This test suite was developed at the National Institute of Standards and Technology by employees of the Federal Government in the course of their official duties. Pursuant to title 17 Section 105 of the United States Code this test suite is not subject to copyright protection and is in the public domain.