- Upgrade test-fixture to use microformats2 class names, e.g.:
- h-x-test-fixture
- h-x-assertion
- ... etc.
- replace 'output' property with separate
- 'p-x-mime' property (on a
<pre>
element) for vcf/ics output, - 'p-x-json' property (on
<source lang=javascript>
or div) for JSON output, and - 'e-x-xml' property for XML output (e.g. Atom).
- 'p-x-mime' property (on a
- replace 'history' with 'p-x-history' and 'h-entry' for sub-structure.
test-fixture-issues: Difference between revisions
Jump to navigation
Jump to search
(Follow-up on the isISODate() special asserts) |
(upgrade test-fixture to microformats2) |
||
Line 1: | Line 1: | ||
[[test-fixture]] issues. Note that test-fixture is a [[poshformat]], has not been through the microformats [[process]]. test-fixture serves a purely functional purpose for microformats [[test-suite]] work. | [[test-fixture]] issues. Note that test-fixture is a [[poshformat]], has not been through the microformats [[process]]. test-fixture serves a purely functional purpose for microformats [[test-suite]] work. | ||
<div class="h-entry hentry"> | |||
{{OpenIssue}} <span class="entry-summary"><time class="dt-published published">2012-09-10</time> raised by <span class="p-author author h-card">[[User:Tantek|Tantek Çelik]]</span></span> | |||
<div class="e-content entry-content discussion issues"> | |||
* Upgrade test-fixture to use [[microformats2]] class names, e.g.: | |||
** h-x-test-fixture | |||
** h-x-assertion | |||
** ... etc. | |||
* replace 'output' property with separate | |||
** 'p-x-mime' property (on a <code><pre></code> element) for vcf/ics output, | |||
** 'p-x-json' property (on <code><source lang=javascript></code> or div) for JSON output, and | |||
** 'e-x-xml' property for XML output (e.g. Atom). | |||
* replace 'history' with 'p-x-history' and 'h-entry' for sub-structure. | |||
</div> | |||
</div> | |||
<div class="hentry"> | <div class="hentry"> |
Latest revision as of 16:59, 10 September 2012
test-fixture issues. Note that test-fixture is a poshformat, has not been through the microformats process. test-fixture serves a purely functional purpose for microformats test-suite work.
open issue! raised by
open issue!
- Output should be specifiable inline, rather than having to be external. Currently the output appears to require linking to an external file, while it can be much more convenient as a test author to specify the output in the test case file itself. In fact, "output" on anything other than a hyperlink should mean that the output is inline in the test case page, rather than in a separate resource. For example: value-dt-test-YYYY-MM-DD--HH-MM. Tantek 18:51, 6 July 2009 (UTC)
- …
open issue!
- Output type could be implied from
a/@type
rather than explicit?. Currently the output type is explicit in atype
attribute, but either the output could just be taken from the anchor, or if it is duplicated visibly, perhaps it should match the MIME type rather than using strings? e.g.<span class="type">text/html</span>
.- +1 I agree this could be simplified by taking the output type from the
type
attribute of an <a href class="output"> rather than making it explicit. However, I think the explicit visible one is a good one (per the visibility principle), and thus we should keep it, make it optional, and fall back to thetype
attribute. Tantek 18:51, 6 July 2009 (UTC) - …
- +1 I agree this could be simplified by taking the output type from the
open issue!
open issue!
- Consider separating *Unit asserts from custom asserts. Although the normalisation of Geo and Dates is a very useful enhancement, they may not be essential (since ISO dates can be compared somewhat reliably as strings, and co-ordinates compared to the same precision as they appear in the source). This seems desirable for simple conversion into something like JUnit, without being dependent on additional functions.
- Some parsers discard the ISO string in favor of another date representation (e.g. MoFo, Sumo). When testing these parsers, equality assertions for dates would require some additional logic to compare the parsed value to the asserted value. For parsers that output dates as a generic data type (e.g. as an integer containing a UNIX timestamp) detecting when to apply this date-specific logic would be non-trivial and could require knowledge of which µf fields should contain dates, undermining the design goal of self contained tests. Keeping a separate equality assertion method for dates could therefore reduce complexity overall. - GeorgeBrock 16:43, 1 July 2009 (UTC)
- If you had, for example
isEqualTo("2009-07-06T22:29:00-0800")
on a property that the parser treats internally as a date, surely it will also parse the2009-07-06T22:29:00-0800
through the same algorithm? I see it might be good to have this explicit, but it also seems to be strongly implicit that where a parser transforms a data-type from the original string, the same transformation will occur before a comparison is made. --BenWard 05:31, 7 July 2009 (UTC)
- If you had, for example
- Some parsers discard the ISO string in favor of another date representation (e.g. MoFo, Sumo). When testing these parsers, equality assertions for dates would require some additional logic to compare the parsed value to the asserted value. For parsers that output dates as a generic data type (e.g. as an integer containing a UNIX timestamp) detecting when to apply this date-specific logic would be non-trivial and could require knowledge of which µf fields should contain dates, undermining the design goal of self contained tests. Keeping a separate equality assertion method for dates could therefore reduce complexity overall. - GeorgeBrock 16:43, 1 July 2009 (UTC)