A user account is required in order to edit this wiki, but we've had to disable public user registrations due to spam.

To request an account, ask an autoconfirmed user on Chat (such as one of these permanent autoconfirmed members).

Validator.nu Unit Tests: Difference between revisions

From WHATWG Wiki
Jump to navigation Jump to search
(full stack)
No edit summary
 
(4 intermediate revisions by one other user not shown)
Line 1: Line 1:
{{Obsolete}}
Validator.nu has various places for unit tests.
Validator.nu has various places for unit tests.


==html5lib Tokenizer Tests==
==html5lib Tokenizer Tests==


The tokenizer of the Validator.nu HTML Parser is tested using the [http://code.google.com/p/html5lib/source/browse/#svn/trunk/testdata/tokenizer tokenizer tests] hosted by the html5lib project. <code>nu.validator.htmlparser.test.TokenizerTester</code> is the test harness.
The tokenizer of the Validator.nu HTML Parser is tested using the [https://github.com/html5lib/html5lib-tests/tree/master/tokenizer tokenizer tests] hosted by the html5lib project. <code>nu.validator.htmlparser.test.TokenizerTester</code> is the test harness.


==html5lib Tree Builder Tests==
==html5lib Tree Builder Tests==


The tree builder of the Validator.nu HTML Parser is tested using the [http://code.google.com/p/html5lib/source/browse/#svn/trunk/testdata/tree-construction tree construction tests] hosted by the html5lib project. <code>nu.validator.htmlparser.test.TreeTester</code> is the test harness.
The tree builder of the Validator.nu HTML Parser is tested using the [https://github.com/html5lib/html5lib-tests/tree/master/tree-construction tree construction tests] hosted by the html5lib project. <code>nu.validator.htmlparser.test.TreeTester</code> is the test harness.


==html5lib Encoding Tests==
==html5lib Encoding Tests==


The meta sniffer of Validator.nu HTML Parser used to be tested using the [http://code.google.com/p/html5lib/source/browse/#svn/trunk/testdata/encoding encoding tests] hosted by the html5lib project. <code>nu.validator.htmlparser.test.EncodingTester</code> is the test harness. ''However, both the tests and the code are out of sync with the spec.''
The meta sniffer of Validator.nu HTML Parser used to be tested using the [https://github.com/html5lib/html5lib-tests/tree/master/encoding encoding tests] hosted by the html5lib project. <code>nu.validator.htmlparser.test.EncodingTester</code> is the test harness. ''However, both the tests and the code are out of sync with the spec.''


==WHATTF Schema Tests==
==WHATTF Schema Tests==
Line 19: Line 21:
==Full-stack tests==
==Full-stack tests==


There is a test harness for full-stack (well, full-stack with JSON output—not HTML output) testing.
There is a [[Validator.nu validator-tester.py|test harness]] for [[Validator.nu Full-Stack Tests|full-stack]] (well, full-stack with JSON output—not HTML output) testing.
 
 
 
[[Category:Validator.nu Documentation]]

Latest revision as of 14:23, 17 March 2015

This document is obsolete.


Validator.nu has various places for unit tests.

html5lib Tokenizer Tests

The tokenizer of the Validator.nu HTML Parser is tested using the tokenizer tests hosted by the html5lib project. nu.validator.htmlparser.test.TokenizerTester is the test harness.

html5lib Tree Builder Tests

The tree builder of the Validator.nu HTML Parser is tested using the tree construction tests hosted by the html5lib project. nu.validator.htmlparser.test.TreeTester is the test harness.

html5lib Encoding Tests

The meta sniffer of Validator.nu HTML Parser used to be tested using the encoding tests hosted by the html5lib project. nu.validator.htmlparser.test.EncodingTester is the test harness. However, both the tests and the code are out of sync with the spec.

WHATTF Schema Tests

Some aspects of the validation layer are tested using the test suite the WHATTF HTML5 schemas. org.whattf.syntax.Driver.java is the test harness. These tests were written when HTML5 still had the concept strict inline / structured inline / block. Also the tests elicit more than one error per test file. The test have not been properly updated to test newer aspects of the HTML5 spec.

Full-stack tests

There is a test harness for full-stack (well, full-stack with JSON output—not HTML output) testing.