Difference between revisions of "test-suite"

From Microformats Wiki
test-suite
Jump to navigation Jump to search
(→‎FAQ: Added paraphrase of JSON vs parsed property comparison)
m (Replace <entry-title> with {{DISPLAYTITLE:}})
 
(11 intermediate revisions by 5 users not shown)
Line 1: Line 1:
<entry-title>microformats test suites</entry-title>
+
{{DISPLAYTITLE:microformats test suites}}
  
 
{{stub}}
 
{{stub}}
Line 22: Line 22:
 
Frequently asked questions about microformats tests / test suites.
 
Frequently asked questions about microformats tests / test suites.
  
 +
* '''How do we create a test suite which can be used for implementations in any langage?'''
 +
** Define the test suites using the [[test-fixture]] microformat (and/or it’s updated mf2 version) so that language-specific test suites can be derived from a single source. See also [[test-suite-brainstorming]]
 
* '''Should we test the whole parser output against a JSON representation of the original data, or compare individual parsed properties?'''
 
* '''Should we test the whole parser output against a JSON representation of the original data, or compare individual parsed properties?'''
 
** Paraphrased from [https://github.com/microformats/tests/issues/1 this issue on github]
 
** Paraphrased from [https://github.com/microformats/tests/issues/1 this issue on github]
** Specifically the difficulty is dates/times, where a single datetime can be specified in many different ways, and also represented as an object native to the language the parser is working in.
+
** Specifically the difficulty is dates/times, where a single datetime can be specified in many different ways, and only sometimes represented as an object native to the language the parser is working in.  Many microformats / [[HTML5]] &lt;time> dates/times/durations are not represented in any native language objects (e.g. month-day). See [http://wiki.whatwg.org/wiki/Time HTML5 Time element proposals] for more variants/details.
 
* …
 
* …
  
 
== see also ==
 
== see also ==
 +
* [[test-suite-brainstorming]]
 +
* [[test-fixture]]
 
* [[microformats2]]
 
* [[microformats2]]
 
* [[microformats2-parsing]]
 
* [[microformats2-parsing]]

Latest revision as of 16:33, 18 July 2020


This article is a stub. You can help the microformats.org wiki by expanding it.

Test suites help interoperability and completeness of microformats parsing. This page documents the effort to produce test cases for microformats2 and parsing patterns, so that you can verify the operations of your parser.

Goals of Test Suite Project

There's no better way for parser writers to verify the correctness and completeness of their code.

We need to provide a suite to:

Test Project

On github:

FAQ

Frequently asked questions about microformats tests / test suites.

  • How do we create a test suite which can be used for implementations in any langage?
    • Define the test suites using the Test Fixture microformat (and/or it’s updated mf2 version) so that language-specific test suites can be derived from a single source. See also test-suite-brainstorming
  • Should we test the whole parser output against a JSON representation of the original data, or compare individual parsed properties?
    • Paraphrased from this issue on github
    • Specifically the difficulty is dates/times, where a single datetime can be specified in many different ways, and only sometimes represented as an object native to the language the parser is working in. Many microformats / Microformats in HTML5 <time> dates/times/durations are not represented in any native language objects (e.g. month-day). See HTML5 Time element proposals for more variants/details.

see also

previously

Previous microformats1 test suites: Test Suites