Test Suites

(Difference between revisions)

Jump to: navigation, search
m (test-suites moved to test-suite: Move to singular, more guessable URL. Keep test-suites plural as a direct.)
(add links to specs and patterns with or needing test suites, added value-class-pattern-tests in particular)
Line 11: Line 11:
==Get the Tests==
==Get the Tests==
-
; hCard
+
microformats:
-
: ???
+
; [[hCard]]
-
; hCalendar
+
: ...
-
: ???
+
; [[hCalendar]]
-
; hAtom
+
: ...
-
: ???
+
; [[hAtom]]
-
; hReview
+
: ...
-
: ???
+
; [[hReview]]
-
; Geo
+
: ...
-
: ???
+
; [[adr]]
 +
: ...
 +
; [[geo]]
 +
: ...
 +
patterns across microformats:
 +
; [[value-class-pattern]]
 +
: [[value-class-pattern-tests]]
 +
; [[include-pattern]]
 +
: ...
 +
==Goals of Test Suite Project==
==Goals of Test Suite Project==
-
 
We need to support specifications with better tests. There's no better way for parser writers to verify the correctness and completeness of their code without them. Microformats are getting adopted by big players, with large, stable implementations and are having bigger and bigger impact. It's critical that implementers don't reinvent the testing wheel for each new project.
We need to support specifications with better tests. There's no better way for parser writers to verify the correctness and completeness of their code without them. Microformats are getting adopted by big players, with large, stable implementations and are having bigger and bigger impact. It's critical that implementers don't reinvent the testing wheel for each new project.
We need to provide a suite to:
We need to provide a suite to:
-
 
* Verify the correctness of microformats parsing
* Verify the correctness of microformats parsing
* Indicate the completeness of a parser implementation
* Indicate the completeness of a parser implementation
Line 35: Line 42:
==Test Structure==
==Test Structure==
-
 
Each test takes the form of:
Each test takes the form of:
Line 63: Line 69:
==Establishment Tasks==
==Establishment Tasks==
-
 
* Get the existing test cases from <code>hg.microformats.org</code> and into a Github repository.  
* Get the existing test cases from <code>hg.microformats.org</code> and into a Github repository.  
** The collaboration functionality of Github is well suited to the development of new tests.
** The collaboration functionality of Github is well suited to the development of new tests.
Line 79: Line 84:
==Related==
==Related==
-
 
* [[test-fixture]]
* [[test-fixture]]
* [[parsers|Parsers]]
* [[parsers|Parsers]]
* [[debugging-tools|Debugging Tools]]
* [[debugging-tools|Debugging Tools]]
* [http://www.ufxtract.com/testsuite/ ufXtract test suite]
* [http://www.ufxtract.com/testsuite/ ufXtract test suite]

Revision as of 18:38, 7 July 2009


So, you want to parse microformats in your app? Awesome. There are parsers in many languages.

A critical effort to assist in interoperability and completeness of microformat parsing is the Test Suite. This page documents the effort to produce test cases for each microformat and parsing pattern, so that you can verify the operations of your parser.

NB: This page is new. There is a limited test suite available already for hCard, hCalendar, hReview and hAtom. It is somewhat outdated and unmaintained, but should give you a starting point. This effort hopes to produce something far more robust and extensive, as well as setting a precedent and framework for future microformats and test suites.

This page will be expanded.

Contents

Get the Tests

microformats:

hCard
...
hCalendar
...
hAtom
...
hReview
...
adr
...
geo
...

patterns across microformats:

value-class-pattern
value-class-pattern-tests
include-pattern
...

Goals of Test Suite Project

We need to support specifications with better tests. There's no better way for parser writers to verify the correctness and completeness of their code without them. Microformats are getting adopted by big players, with large, stable implementations and are having bigger and bigger impact. It's critical that implementers don't reinvent the testing wheel for each new project.

We need to provide a suite to:

Test Structure

Each test takes the form of:

This generic format has the following advantages:

There is to be one test suite per format. In some cases, such as geo and adr with hCard, the address and geo portions will be included in the geo and adr test suites and hCard parsers will be expected to run cases from all three suites.

Tests using global patterns, such as value-class and abbr-design-pattern should be included in tests for all vocabularies, where appropriate.

Each vocabulary suite is organized as follows

Establishment Tasks

Later, thought should be given to how assertions can be used to test implied meanings in microformats. For example, we cannot test ‘hCard is an organisation’ using a simple assert, since that is not a field of hCard (but would be a data field in an implementation). Initially, these implied meanings should just be documented in the tests, and applicable implementations can take note.

Related

Test Suites was last modified: Wednesday, December 31st, 1969

Views