Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
Next revisionBoth sides next revision
test:selftest [2010/02/04 16:55] – created fantasaitest:selftest [2010/02/04 17:18] fantasai
Line 1: Line 1:
 ====== Self-Describing Tests ====== ====== 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.
 +
 +<note example>
 +The following are some examples of self-describing tests, using common techniques to identify passes:
 +
 +    * [[http://www.w3.org/Style/CSS/Test/CSS2.1/20100127/html4/escapes-000.htm|Identical Renderings]]
 +    * [[http://www.w3.org/Style/CSS/Test/CSS2.1/20100127/html4/escapes-002.htm|Green Background]]
 +    * [[http://www.w3.org/Style/CSS/Test/CSS2.1/20100127/html4/abspos-containing-block-003.htm|No Red 1]]
 +    * [[http://www.w3.org/Style/CSS/Test/CSS2.1/20100127/html4/border-conflict-w-079.htm|No Red 2]]
 +    * [[http://www.w3.org/Style/CSS/Test/CSS2.1/20100127/html4/margin-collapse-clear-007.htm|Described Alignment]]
 +    * [[http://www.w3.org/Style/CSS/Test/CSS2.1/20100127/html4/table-anonymous-objects-021.htm|Overlapping]]
 +    * [[http://www.w3.org/Style/CSS/Test/CSS2.1/20100127/html4/border-style-inset-001.htm|Imprecise Description 1]]
 +    * [[http://www.w3.org/Style/CSS/Test/CSS2.1/20100127/html4/text-decoration-001.htm|Imprecise Description 2]]
 +</note>
 +
 +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 [[test:reftest|reftest]] format may be more appropriate.)
 +
 +Self-describing tests must follow the [[test:css2.1:format|CSS test format guidelines]].
 +
 +Additional information on writing self-describing tests is available [[http://www.w3.org/Style/CSS/Test/guidelines.html|on the W3C site]].
 
test/selftest.txt · Last modified: 2014/12/09 15:48 by 127.0.0.1
Recent changes RSS feed Valid XHTML 1.0 Valid CSS Driven by DokuWiki