Test Metadata

W3C Working Group Note 14 September 2005

This version:
Latest version:
Patrick Curran, Sun Microsystems
Karl Dubost, W3C
See Acknowledgments.


The definition and provision of metadata has proved helpful in a variety of ways during the test development and test execution processes. This document defines a minimal set of metadata elements that can usefully be applied to tests that are intended for publication within a test suite.

Status of this document

This section describes the status of this document at the time of its publication. Other documents may supersede this document. A list of current W3C publications and the latest revision of this technical report can be found in the W3C technical reports index at http://www.w3.org/TR/.

This document is a W3C Working Group Note. It has been produced by the Quality Assurance Working Group, which is part of the Quality Assurance Activity. It has been made available for discussion by W3C members and other interested parties. For more information about the QA Activity, please see the QA Activity statement. Translations of this document may be available.

This is the first published version of this document. It has been written along with the QA Framework by collecting the test development experience of W3C Working Groups and summarizing the work done on the Wiki about tests and metadata.

Publication as a Working Group Note does not imply endorsement by the W3C Membership. This is a draft document and may be updated, replaced or obsoleted by other documents at any time. It is inappropriate to cite this document as other than work in progress.

The QA Working Group does not expect this document to become a Recommendation. Rather, after further development, review and refinement, it may be updated and maintained as an Interest Group Note.

You may email comments on this document to www-qa@w3.org, the publicly archived list of the QA Interest Group.

Table of contents

1. Introduction

To be truly useful, a test suite should consist of more than a simple collection of tests. Additional information is typically required to help users understand how to execute the tests and how to interpret the results. Much of this information should be provided in the test suite documentation but some is more appropriately provided in the form of metadata about the tests themselves. Well-defined metadata can help in:

Most test suites provided by W3C Working Groups make use of some form of metadata. However, the extent of metadata usage and the forms and syntax in which metadata elements are defined varies widely from Group to Group. This document defines a minimal set of metadata elements that have proved useful in practice and attempts to standardize their names, syntax, and usage. If the use of standard metadata elements is adopted within the W3C it is likely that standardized tools will be developed to facilitate the tasks listed above.

Please note that these metadata elements are simply suggestions. Additional elements may be appropriate for your implementation. It is also likely that you will also want to define metadata elements that are associated with the entire test suite rather than with individual tests, and it may even make sense to define metadata about metadata (for example, the Dublin Core elements Date [DCES] and Language [DCES] may usefully be applied to several of the elements defined below.)

This document re-uses the Dublin Core elements where it seems appropriate. DCMI Metadata Terms [DCMI] gives an introduction to the use of metadata. For background information on the test development process and additional rationale for the the use of metadata, the QA Working Group has created a Test FAQ [TEST-FAQ]. A practical implementation of some of these principles is available in XML Query Test Suite defined by the XML Query and XSL Working Groups. (Their Guidelines for Test Submission [XQUERY-TEST] and Guidelines for Test Execution [XQUERY-TEST] provide explanations and examples.)

2. Metadata elements

2.1 Identifier

Name Identifier
Description An unambiguous reference to the test.
Rationale Enables the test to be referenced and identified.
Required? Yes.
Syntax Free-form (URI recommended).
Example CSS 2.1 Test Suite: Pseudo-elements in Selectors [CSS-TEST]
See Also
Comments Most W3C test suites use URIs as identifiers.

2.2 Title

Name Title
Description The name by which the test is formally known.
Rationale It may be advantageous to provide a more human-oriented alternative to the Identifier.
Required? No.
Syntax Text.
Example The CSS Test Suite [CSS-TEST] uses the term Descriptionfor human readable names that more properly match this Title element. (For example, CSS 2.1 Test Suite: Co>.)
See Also
Comments This element is optional because the Identifier will often be sufficient. Note also that in very large test suites it may be impractical to define unambiguous Title.

2.3 Purpose

Name Purpose
Description A brief explanation of the reason the test was developed.
Rationale Provides additional context for the test.
Required? Yes.
Syntax Free-form (hypertext) or constrained plain text
Example The CSS1 test suite [CSS-TEST] provides such explanations. For example: “This page tests the 'text-transform' property of CSS1”.
See Also
Comments The Purpose should typically be kept short enough (a 'one liner') to be displayed in tabular format (other constraints, for example a prohibition on embedded newlines, may also be required to ensure that this element can be processed by various tools). The Description element should be used where a more detailed explanation is required.

2.4 Description

Name Description
Description A representation in words of the nature and characteristics of the test.
Rationale A detailed explanation can help reviewers to understand the purpose of a test and may also provide those executing the test with information that will be helpful if the test fails.
Required? No.
Syntax Free-form (hypertext).
Example The WebCGM test suite [WEBCGM-TEST] incorporates detailed descriptions. For example: "Test basic CGM-to-HTML link, from a Application Structure with linkuri APS Attribute within the CGM, to a whole HTML document, with no behaviors or fragments associated with the link."
See Also
Comments This element can be used to provide more detailed information than can be provided in the relatively short Purpose element.

2.5 Status

Name Status
Description One of an enumerated list of values that can be used to track the state of a test at a given time.
Rationale It can be helpful to track the status of a test during the development process.
Required? No.
Syntax Constrained choice from an enumerated list
Example One of: unconfirmed, new, assigned, pending, accepted, rejected, holding (see Conformance Test Process For WCAG 2.0 [WCAG2-CONF-PROCESS] and their test Status document).
See Also  
Comments This metadata element may also be useful after test suite publication, when it could be used to record the state of challenges to the validity of the test.

2.6 SpecRef

Name SpecRef
Description Identification of the portion of the specification tested by this test.
Rationale Traceability back to the specification.
Required? Yes.
Syntax Freeform hypertext or more usefully a link to markup or anchors in the text of the specification.
Example The HTML 4.1 test suite provides a list of Testable Assertions that associates individual tests with assertions in the specification.
See Also  
Comments The more specific this reference is the better. (Simply pointing to the beginning of a large sub-section of the spec is not helpful. Identifying the exact string containing the requirement to be tested is ideal.)

2.7 Preconditions

Name Preconditions
Description Conditions that must be met before this test is executed.
Rationale Any such conditions must be understood and met before the test can be successfully executed.
Required? No.
Syntax Free-form (hypertext).
Example It might be necessary that a network connection be available or a server process be running before the test is executed.
See Also Test Metadata: Inputs

2.8 Inputs

Name Inputs
Description Parameters or data that are needed for the test execution.
Rationale Must be understood and supplied for test execution.
Required? No.
Syntax Implementation dependent.
Example The XML Query Test Suite metadata [XQUERY-TEST] defines an input_file element.
See Also Test Metadata: Preconditions

2.9 ExpectedResults

Name ExpectedResults

The results that a conformant implementation is expected to produce when this test is executed.

Rationale If these are not defined, it will be impossible to determine whether the test passed or failed.
Required? Yes.
Syntax Implementation dependent.
Example tests within the CSS Test Suite embed their expected results within the test's output. See this example [CSS-TEST]. The XML Query Test Suite metadata [XQUERY-TEST] defines an output_file element.
See Also  

2.10 Version

Name Version
Description An identifier that allows one to distinguish between different revisions of test.
Rationale tests often evolve over time, and it is important to maintain a history and to be able to identify and distinguish between different revisions.
Required? Yes.

Implementation dependent.

Example This will often be generated by a source-code control system such as CVS .
See Also  
Comments ISSUE: It is unclear whether it is necessary to apply version numbers to individual tests. More common practice is to version the entire test suite. Ideally tests will not need to be revised as the specification evolves. However, this is sometimes necessary, and at a minimum each Working Group should define SpecRef and possibly other metadata such as Grouping elements to indicate which versions of the specification an individual test supports.

2.11 Contributor

Name Contributor
Description The individual or organization that contributed this test.
Rationale It may be necessary to contact the contributor to ask for information about the test or to request an update.
Required? Yes.
Syntax Free-form.
Example The XML Conformance Test Suite [XML-TEST] encodes the contributor in the directory structure used to store the tests.
See Also Dublin Core: Contributor [DCES]

2.12 Rights

Name Rights
Description Information about rights held in and over the test.
Rationale Publishers and users of the test need to understand the associated Intellectual Property Rights (IPR).
Required? Yes.
Syntax Ask your lawyer.
See Also Dublin Core: Rights [DCES]
Comments This will often be simply a pointer to a copyright notice contained within the source code.

2.13 Grouping

Name Grouping
Description A mechanism for classifying tests into groups.
Rationale To enable the selection of subsets of tests that share certain characteristics.
Required? No.
Syntax Implementation dependent. Possibilities include naming conventions and enumerated lists.
Example Tests may be classified as interactive or automated, positive or negative.
See Also  
Comments An important use of grouping techniques is to classify tests that belong to particular profiles, modules, or other discretionary groupings (see Variability in Specifications [SPEC-VARIABILITY] for a detailed discussion of these issues). The SVG test suite [SVG-TEST], for example, uses naming conventions to distinguish between tests targeted at different profiles (full, basic, or tiny).

2.14 SeeAlso

Name SeeAlso
Description A list of references to relevant materials.
Rationale Can help to clarify the intent or usefulness of the test.
Required? No.
Syntax Free-form (hypertext).
Example A pointer to an item in an issue-tracking system such as Bugzilla [BUGZILLA] or to a mailing list thread in which the justification for this test is discussed.
See Also Dublin Core: Relation [DCES]

3. Acknowledgments

The following QA Working Group and Interest Group participants have contributed significantly to this document:

4. References

Bugzilla http://www.bugzilla.org/ .
Cascading Style Sheets test suites, CSS Working Group, http://www.w3.org/Style/CSS/Test/ .
Dublin Core Metadata Element Set, Version 1.1: Reference Description, Dublin Core Metadata Initiative, DCMI Recommendation, 20 December 2004, http://dublincore.org/documents/2004/12/20/dces/ . Latest version available at http://dublincore.org/documents/dces/ .
DCMI Metadata Terms, Dublin Core Metadata Initiative, DCMI Recommendation, 13 June 2005, http://dublincore.org/documents/2005/06/13/dcmi-terms/ . Latest version available at http://dublincore.org/documents/dcmi-terms/ .
HTML4 Test Suite, W3C, http://www.w3.org/MarkUp/Test/HTML401/current/ .
Variability in Specifications, D. Hazaël-Massieux, L. Rosenthal, Editors, W3C Working Group Note, 31 August 2005, http://www.w3.org/TR/2005/NOTE-spec-variability-20050831/ . Latest version available at http://www.w3.org/TR/spec-variability/ .
W3C Scalable Vector Graphics (SVG) 1.1 Test Suite, SVG Working Group, http://www.w3.org/Graphics/SVG/Test/ .
Test Development FAQ, QA Working Group, http://www.w3.org/QA/WG/2005/01/test-faq .
Conformance Test Process For WCAG 2.0, WCAG WG, 23 February 2005, http://www.w3.org/WAI/GL/WCAG20/tests/ctprocess.html .
WebCGM Test Suite, OASIS CGM Open, http://www.cgmopen.org/resources/webcgm-test-suite.html .
Extensible Markup Language (XML) Conformance Test Suites, W3C, NIST, http://www.w3.org/XML/Test/ .
XML Query Test Suite, W3C XML Query Working Group, W3C XSL Working Group, http://www.w3.org/XML/Query/test-suite/ .