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.
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.
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#
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
rdft:TestTurtleNegativeSyntax
rdft:TestTriGPositiveSyntax
rdft:TestTriGNegativeSyntax
rdft:TestNTriplesPositiveSyntax
rdft:TestNTriplesNegativeSyntax
rdft:TestNQuadsPositiveSyntax
rdft:TestNQuadsNegativeSyntax
rdft:TestXMLNegativeSyntax
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.
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
rdft:TestTurtleNegativeEval
rdft:TestTrigEval
rdft:TestTrigNegativeEval
rdft:XMLEval
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]]).
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:
mf:name
)mf:action
)false
(mf:result
),mf:entailmentRegime
),mf:recognizedDatatypes
),mf:unrecognizedDatatypes
).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,
false
as output, either determines that the input RDF graph entails (does not entail) an inconsistent RDF graph or that the input RDF graph is inconsistent (consistent).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.