Markup Validator's test collection

Table of contents

  1. Valid Document (all should pass validation)
  2. Invalid documents
  3. Docs that should be Well Formed
  4. Various Encodings
  5. Error conditions & strange cases
  6. User Interface tests
  7. Bugs and Regression Tests
  8. Test for specific output

This page lists a few test documents and test scenarios for the W3C Markup Validator make sure everything works fine after making changes to the validator. If you can think of interesting test cases that aren't on this page, let us know.

Valid Documents

Document types support

Below is a list of sample documents for a number of document types the validator is supposed to be supporting. The first validate link will attempt validation with the current instance, for test purposes. The v.w.o instance can be taken as reference/comparison.

Document types outside the main catalogue

Below is a number of other types of documents that the validator does not have in its "hardcoded" catalogue, but should support anyway. All these documents should validate, without "pretty print" for the document type

Valid Doctypeless Documents

Some document types (SVG) do not require the presence of the DOCTYPE declaration, although a DTD can be used to validate. The validator can however determine the version to validate against by preparsing the root element and the presence of version, baseProfile attributes.

Valid Documents, with Warnings

Valid Documents served with a wrong media type

Bug Regression Tests: Valid documents

Invalid Documents

Miscellaneous invalid docs

Various often-invalid site

The following sites/pages are often invalid, but do not rely on the results.

Missing Doctype

See also Docs that should be Well Formed for examples of doctype-less but well-formed XML documents.

DTD-Valid but not conformant

For those, we will need to change the message, or hordes of SGML zombies will come down upon us ;)...

Documents that are invalid, which the validator passes as OK

Wrong diagnosis

Docs that should be Well Formed

well formed but no doctype. The validator could mark them as well formed, but not mention validity?

Various Encodings

Error conditions & strange cases

This should be split in UI testing and regression tests

The following documents trip up the parser pretty badly - finds errors way beyond the last line

User Interface tests

The following tests do not test the binary "validity" results, but the proper handling of options, errors, various outputs, etc. "validate" links use this instance, with validator.w3.org links added for reference comparison

Bugs and Regression Tests

These should be tied to a bug report on either mailing-list and/or bugzilla whenever possible.

Test for specific output

Output of preparse warnings

Other Test Suites