This page has been deprecated and is no longer being maintained.
For up to date information on contributing and authoring CSS Test suites, see:

Self-Describing Tests

A self-describing test is a test page that describes what the page should look like when the test has passed. A human examining the test page can then determine from the description whether the test has passed or failed.

The following are some examples of self-describing tests, using common techniques to identify passes:

Self-describing tests have some advantages:

  • They can be run easily on any layout engine.
  • They can test areas of the spec that are not precise enough to be comparable to a reference rendering. (For example, underlining cannot be compared to a reference because the position and thickness of the underline is UA-dependent.)
  • Failures can (should) be easily determined by a human viewing the test without needing special tools.

They also have some disadvantages:

  • They cannot be automated: a human must determine whether the test has passed or failed.
  • In some cases it is difficult or impossible to design the test for a glaringly obvious pass or fail. (In these cases, if it's possible to create a reference, the reftest format may be more appropriate.)

Self-describing tests must follow the CSS test format guidelines.

Additional information on writing self-describing tests is available on the W3C site.

test/selftest.txt · Last modified: 2014/12/09 15:48 by
Recent changes RSS feed Valid XHTML 1.0 Valid CSS Driven by DokuWiki