The Resource Description Framework (RDF) is a framework for representing information in the Web. This document lists the test suites and implementation reports for RDF 1.1 Semantics as well as the various serialization formats.

Test Suites and Implementation Reports

The following are links to the syntax and semantics test suites and implementation reports:

RDF 1.1 Concepts [[RDF11-CONCEPTS]] does not have a test suite and is not directly implemented in software; instead, it is implemented by the specs which build on it, including the other specs in the set above.

General instructions for running RDF Test suites

All test suites have a common test manifest representation using test vocabularies similar to the SPARQL 1.1 Test case structure [[SPARQL11-TEST-CASE]]. Test manifests are expressed using [[TURTLE]], except for the JSON-LD test manifests, which are represented using [[JSON-LD]]. (Detailed information on the JSON-LD Test Suite is at [[JSON-LD-TESTS]]). The Manifest has a header, and lists one or more test entries such as the following:

In addition to the namespaces described in [[SPARQL11-TEST-CASE]], RDF manifests use the following vocabularies:

rdft
http://www.w3.org/ns/rdftest#

Syntax Tests

Concrete RDF syntaxes may have positive- and negative-syntax tests, intended to determine if a processor correctly recognizes valid or invalid serializations. Positive Syntax Tests include a name, optional comment, and action along with a type which identifies them as being a Syntax Test for the appropriate serialization format. An example Turtle Syntax test definition is the following:

Class names vary by serialization format and include the following:

rdft:TestTurtlePositiveSyntax
A Positive [[TURTLE]] Syntax Test.
rdft:TestTurtleNegativeSyntax
A Negative [[TURTLE]] Syntax Test.
rdft:TestTriGPositiveSyntax
A Positive [[TRIG]] Syntax Test.
rdft:TestTriGNegativeSyntax
A Negative [[TRIG]] Syntax Test.
rdft:TestNTriplesPositiveSyntax
A Positive [[N-TRIPLES]] Syntax Test.
rdft:TestNTriplesNegativeSyntax
A Negative [[N-TRIPLES]] Syntax Test.
rdft:TestNQuadsPositiveSyntax
A Positive [[N-QUADS]] Syntax Test.
rdft:TestNQuadsNegativeSyntax
A Negative [[N-QUADS]] Syntax Test.
rdft:TestXMLNegativeSyntax
A Negative [[RDF11-XML]] Syntax Test.

A positive test is passed if an implementation can parse the content at the URL identified by the object of the mf:action properly using rules for the the appropriate syntax.

A negative test is passed if an implementation raises an error when it parses content at the URL identified by the object of the mf:action properly using rules for the appropriate syntax.

Evaluation Tests

Concrete RDF syntaxes may have positive- and negative-evaluation tests, intended to determine if a processor correctly evaluates serializations. Positive Evaluation Tests include a name, optional comment, action, and result along with a type which identifies them as being an Evaluation Test for the appropriate serialization format. An example Turtle Evaluation test definition is the following:

Class names vary by serialization format and include the following:

rdft:TestTurtleEval
A Positive [[TURTLE]] Evaluation Test.
rdft:TestTurtleNegativeEval
A Negative [[TURTLE]] Evaluation Test.
rdft:TestTrigEval
A Positive [[TRIG]] Evaluation Test.
rdft:TestTrigNegativeEval
A Negative [[TRIG]] Evaluation Test.
rdft:XMLEval
A Positive [[RDF11-XML]] Evaluation Test.

A positive test is passed if an implementation parses the input (identified by the object of the mf:action property) using the appropriate syntax into a graph or dataset, parses the expected result (identified by the object of the mf:result property) into another graph or dataset, and those two graphs/datasets are isomorphic (see [[RDF11-CONCEPTS]]).

A negative test is passed if an implementation parses the input (identified by the object of the mf:action property) using the appropriate syntax into a graph or dataset, parses the expected result (identified by the object of the mf:result property) into another graph or dataset, and those two graphs/datasets are _not_ isomorphic (see [[RDF11-CONCEPTS]]).

Sematics Tests

These tests test implementations of RDF and RDFS Entailment [[RDF11-MT]]. Entailment Tests (mf:PositiveEntailmentTest or mf:NegativeEntailmentTest) include a name, comment, action, result, an entailment regime, a list of recognized datatypes and a list of unrecognized datatypes, and result along with a type which identifies them as being an Entailment Test for the appropriate serialization format.

All tests have the following properties:

An example Entailment test is the following:

An implementation passes a Positive (Negative) Entailment Test if, when configured to (1) perform entailment under the entailment regime of the test or some entailment regime that is stronger (weaker) than the entailment regime and (2) recognize all the datatypes in the list of recognized datatypes and none of the datatypes in the list of unrecognized datatypes,

An implementation also passes a test if when configured differently from a correct configuration as given above nonetheless produces the given result, and the result is correct in the configured entailment regime with the configured recognized datatypes.