W3C home > Mailing lists > Public > public-html-testsuite@w3.org > November 2009

RE: Test Case Template/Meta Data

From: Kris Krueger <krisk@microsoft.com>
Date: Fri, 20 Nov 2009 05:12:04 +0000
To: 'James Graham' <jgraham@opera.com>
CC: "'public-html-testsuite@w3.org'" <public-html-testsuite@w3.org>
Message-ID: <3607818D324EC04E8767AA21E274C023202382EA@TK5EX14MBXW652.wingroup.windeploy.ntdev.microsoft.com>
I agree that having meta data in each test case would be too much to handle if the
suite ends up with thousands of test cases.  

Though I do think we need to track what part of the spec have test cases and which 
parts do not have test cases.  Eventually we want to have tests for the whole 
specification, so that the spec can get to rec.  Right?

For example it was mentioned that the URI below is a set of HTML5 parser tests. 


Now if one didn't know that this was a parser test, how long would it take to 
understand this test? A few Q's below....

 * What parts of the HTML5 parsing does it specifically test?
 * What parts of the HTML5 parsing doesn't it not test?
 * What does failure look like?
 * What should we focus on adding next for parsing tests section,
 * When a section in the spec changes what tests need to be updated? Which do not?
 * If a UA fails a test, how can they be informed on why they fail the test or 
   if they want to suggest an update to the spec so that it is more clear? 
   Or even argue that the test is incorrect?

My fear is that without placing this meta data in the test suite we'll end up with 
just a bunch of 'ad hoc' html5 tests that don't help the spec get to rec or lead 
to interoperable implementations.

Hopefully we can agree that it would be good to add this 'meta data' for tests in 
some form in the test suite.


9.2 Parsing HTML documents
9.2.1 Overview of the parsing model
9.2.2 The input stream Determining the character encoding Preprocessing the input stream Changing the encoding while parsing
9.2.3 Parse state The insertion mode The stack of open elements The list of active formatting elements The element pointers Other parsing state flags
9.2.4 Tokenization Data state Character reference data state Tag open state Close tag open state Tag name state Before attribute name state Attribute name state After attribute name state Before attribute value state Attribute value (double-quoted) state Attribute value (single-quoted) state Attribute value (unquoted) state Character reference in attribute value state After attribute value (quoted) state Self-closing start tag state Bogus comment state Markup declaration open state Comment start state Comment start dash state Comment state Comment end dash state Comment end state Comment end bang state Comment end space state DOCTYPE state Before DOCTYPE name state DOCTYPE name state After DOCTYPE name state Before DOCTYPE public identifier state DOCTYPE public identifier (double-quoted) state DOCTYPE public identifier (single-quoted) state After DOCTYPE public identifier state Before DOCTYPE system identifier state DOCTYPE system identifier (double-quoted) state DOCTYPE system identifier (single-quoted) state After DOCTYPE system identifier state Bogus DOCTYPE state CDATA section state Tokenizing character references
9.2.5 Tree construction Creating and inserting elements Closing elements that have implied end tags Foster parenting The "initial" insertion mode The "before html" insertion mode The "before head" insertion mode The "in head" insertion mode The "in head noscript" insertion mode The "after head" insertion mode The "in body" insertion mode The "in RAWTEXT/RCDATA" insertion mode The "in table" insertion mode The "in table text" insertion mode The "in caption" insertion mode The "in column group" insertion mode The "in table body" insertion mode The "in row" insertion mode The "in cell" insertion mode The "in select" insertion mode The "in select in table" insertion mode The "in foreign content" insertion mode The "after body" insertion mode The "in frameset" insertion mode The "after frameset" insertion mode The "after after body" insertion mode The "after after frameset" insertion mode
9.2.6 The end
9.2.7 Coercing an HTML DOM into an infoset
9.2.8 An introduction to error handling and strange cases in the parser Misnested tags: <b><i></b></i> Misnested tags: <b><p></b></p> Unexpected markup in tables Scripts that modify the page as it is being parsed

-----Original Message-----
From: James Graham [mailto:jgraham@opera.com] 
Sent: Thursday, November 19, 2009 2:50 PM
To: Kris Krueger
Cc: 'public-html-testsuite@w3.org'
Subject: RE: Test Case Template/Meta Data

Quoting Kris Krueger <krisk@microsoft.com>:

> Would you agree that one test or set of tests should somehow contain  
>  this meta data?
> The meta data doesn't have to be specifically embedded into every   
> individual specific test.  For example it could be stored in another  
>  file (xml?) and still provide information about what this test is   
> testing, the test status, etc..

I tend to agree with Philip about the general approach we should take.  
With regard to metadata, each additional piece of metadata that has to  
accompany a test is a disincentive to write that test at all (because  
it adds to the effort required to write the test and keep it up to  
date). Therefore I think we should be looking to justify each piece of  
required metadata as essential or at least as having a good  
opportunity cost (e.g. by making the testsuite more maintainable).

 From the list you mentioned:
> Author       -> Who created the test

Can be handled by the VCS.

> Status/Phase -> Approved/Draft/Submitted

Can be stored out of band if we actually do this. (This approach  
requires tests have a unique associated identifier).

> Reviewer     -> Who reviewed the test case

Can be stored out of band if we do this.

> Help         -> URI back to the specification
> Assert       -> Describes what specifically the test case tests

These seem quite quite similar. Tests that test a particular  
conformance criterion could have links to the corresponding fragment  
id in the spec. For areas like parsing tests will inevitably touch on  
multiple conformance criteria. With the html5lib tests we haven't  
really found a good way to associate the tests with part of the spec  
in such a way that it is obvious which tests need to change when a  
given part of the spec changes. All the obvious ways to do this (e.g.  
listing all the tokenizer and tree-construction phases that a given  
input should pass through) end up being so much effort that no one  
would bother to write any tests at all if this were required. Instead  
we have just dealt with changes to the spec in an ad-hoc manner. This  
doesn't seem like a bad strategy since the spec should become more  
stable with time, not less.
Received on Friday, 20 November 2009 05:12:57 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 15:49:33 UTC