From W3C Wiki
Various developers have created implementations and test suites for the URL, URI and IRI specifications, and have discussed them on the uri and [htp://lists.w3.org/Archives/Public/public-iri/ public-iri] and related MailingLists:
- URL parsing Adam Barth 22 Apr 2010 - webkit tests
- GrahamKlyne: UriTest.n3; also .rdf, .xls, .csv. see discussion 8 Feb 2006. An updated version of these test cases is available in Haskell source code at URITest.hs.
- Sam Ruby: Urlnorm
- MSM URI spec impl in XSLT (somewhat like uri.xsl by DanConnolly)
- TimBL and DanConnolly swap/uripath.py contains unit tests
- TimBL's uri.js and tests
- Martin Dürst: uri-rel-test.html
- DavidPowell: The above tests in XML format, with an XSLT test-harness for an XSLT implementation of a URI resolver
- Roy Fielding: part 1, part 2, part 3, part 4, part 5
- MikeBrown: the unit tests for 4Suite XML's Uri.py (for Python) contain many of the above, plus a few more from various sources. this page runs many of the same tests against the reference resolver in his uri_funcs.js as well as TimBL's uri.js.
- DaveBeckett: Raptor C libraries for RDF contain URI parsing and resolving code, but no tests
- Sebastian Pipping: the uriparser library (written in C) contains a number of test cases.
- Aaron Swartz: an URI test suite for testing a tcl parser.
- Mark Nottingham: Python URI grammar checking against RFC3986 (translated from the BNF)
These tests were explicitly oriented toward "IRI" testing, although the line between URI and IRI testing can be vague (some of the URI tests were URL tests)SSS:
- Chris Weber: http://lists.w3.org/Archives/Public/uri/2012Oct/0007.html (tests at https://github.com/cweb/iri-tests )
- W3C I18N group: http://www.w3.org/International/iri-edit/testing.html
- Jeremy Carroll: Towards a test suite ... 21 Dec 2004
- Martin Dürst: Internationalized Resource Identifiers (IRI) Test Overview work in progress around Apr 2005
Moving tests to W3C testing infrastructure
Systems to test
Of course, it is important to test how browsers behave to make sure the browsers "match reality". However, in addition, URIs and IRIs are also supported by important elements of the infrastructure: proxies and web servers. So testing should extend to those elements. Other systems that use URIs that are not browsers include Atom (for news feeds), and XMPP (for instant messaging). Testing those elements will be problematic without a broader test infrastructure.
Do we need to find other systems, e.g., those that use 'snmp' scheme?
Do we need to test IRI handling through registerProtocolHandler.
Testing Fragment Identifier usage
For a variety of MIME types, browsers need to pass through fragment identifiers, e.g., page numbers for PDF to the PDF reader.
Additional (older) information
swap/uripath.py and Uri.py also contain functions for deriving a relative URI reference from an origin URI and target URI.