Test Suites

Revision as of 17:18, 2 December 2012 by Tantek (Talk | contribs)
(diff) ←Older revision | Current revision (diff) | Newer revision→ (diff)

Jump to: navigation, search


Note: This page reflects 2009 era test suite efforts for a set of stable microformats as of that time. See the current test-suite page for modern microformats2 test suite efforts. Tantek 17:18, 2 December 2012 (UTC)


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.

Contents

Get the Tests

specific microformats:

hCard
http://ufxtract.com/testsuite/hcard/
...
hCalendar
value class pattern date and time hCalendar tests
http://ufxtract.com/testsuite/hcalendar/
...
hReview
...
hAtom
...
adr
...
geo
http://ufxtract.com/testsuite/geo/default.htm
...
hResume
http://ufxtract.com/testsuite/hresume/default.htm
...


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.

past tests

There are also some older test suites available for hCard, hCalendar, hReview and hAtom. They are somewhat outdated and unmaintained, but should give you a starting point. The effort described on this page hopes to produce something far more robust and extensive, as well as setting a precedent and framework for future microformats and test suites.

Related

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

Views