Test case manifest vocabulary extensions

W3C

Alternate versions of the test vocabulary definition exist in Turtle and JSON-LD.

Test Case Classes

Compact Evaluation Test (jld:CompactTest)

A CompactTest modifies either a PositiveEvaluationTest, NegativeEvaluationTest, PositiveSyntaxTest or NegativeSyntaxTest.

Expand Evaluation Test (jld:ExpandTest)

A ExpandTest modifies either a PositiveEvaluationTest, NegativeEvaluationTest, PositiveSyntaxTest or NegativeSyntaxTest.

Flatten Evaluation Test (jld:FlattenTest)

A FlattenTest modifies either a PositiveEvaluationTest, NegativeEvaluationTest, PositiveSyntaxTest or NegativeSyntaxTest.

Frame Evaluation Test (jld:FrameTest)

A FrameTest modifies either a PositiveEvaluationTest, NegativeEvaluationTest, PositiveSyntaxTest or NegativeSyntaxTest.

From RDF Evaluation Test (jld:FromRDFTest)

A FromRDFTest modifies either a PositiveEvaluationTest, NegativeEvaluationTest, PositiveSyntaxTest or NegativeSyntaxTest.

HTML Evaluation Test (jld:HtmlTest)

An HtmlTest modifies either a PositiveEvaluationTest or NegativeEvaluationTest indicating that the source is of type text/html, which requires optional HTML script extraction support.

HTTP Evaluation Test (jld:HttpTest)

An HttpTest modifies either a PositiveEvaluationTest or NegativeEvaluationTest.

Negative Evaluation Test (jld:NegativeEvaluationTest)

A Negative Evaluation test is successful when the result of processing the input file specified as mf:action (aliased as "input" in test manifest) results in the error identified by the literal value of mf:result (aliased as "expectErrorCode" in test manifest). The specifics of invoking test, including the interpretation of options (:option) and other input files are specified through another class. See the README for more details on running tests.

Negative Syntax Test (jld:NegativeSyntaxTest)

A type of test specifically for syntax testing. Syntax tests are not required to have an associated result, only an action. Negative syntax tests are tests of which the result should be a parser error.

Positive Evaluation Test (jld:PositiveEvaluationTest)

A Positive Evaluation test is successful when the result of processing the input file specified as mf:action (aliased as "input" in test manifest) exactly matches the output file specified as mf:result (aliased as "expect" in test manifest) using the comparison defined in another class. The specifics of invoking test, including the interpretation of options (:option) and other input files are specified through another class.

Positive Syntax Test (jld:PositiveSyntaxTest)

A type of test specifically for syntax testing. Syntax tests are not required to have an associated result, only an action.

Processor Options (jld:Option)

Options passed to the test runner to affect invocation of the appropriate API method.

Superclass of all JSON-LD tests (jld:Test)

All JSON-LD tests have an input file referenced using mf:action (aliased as "input" in test manifest). Positive and Negative Evaluation Tests also have a result file referenced using mf:result (aliased as "expect" and "expectErrorCode" for respectively Positive and Negative Evaluation Tests in test manifest). Other tests may take different inputs and options as defined for each test class. Tests should be run with the processingMode option set to "json-ld-1.1", unless specified explicitly as a test option.

To RDF Evaluation Test (jld:ToRDFTest)

A ToRDFTest modifies either a PositiveEvaluationTest, NegativeEvaluationTest, PositiveSyntaxTest or NegativeSyntaxTest.

Test Case Properties

HTTP Accept (jld:httpAccept)

An HTTP Accept header.

Domain
jld:Option
Range
xsd:string
HTTP link (jld:httpLink)

An HTTP Link header to be added to the result of requesting the input file.

Domain
jld:Option
Range
xsd:string
HTTP status (jld:httpStatus)

The HTTP status code that must be returned when the input file is requested. This is typically used along with the redirectTo property.

Domain
jld:Option
Range
xsd:integer
base (jld:base)

The base IRI to use when expanding or compacting the document. If set, this overrides the input document's IRI.

Domain
jld:Option
Range
rdfs:Resource
compact arrays (jld:compactArrays)

If set to true, the JSON-LD processor replaces arrays with just one element with that element during compaction. If set to false, all arrays will remain arrays even if they have just one element.

Domain
jld:Option
Range
xsd:boolean
compact to relative (jld:compactToRelative)

If set to false, the JSON-LD processor will not attempt to compact using document-relative IRIs.

Domain
jld:Option
Range
xsd:boolean
content type (jld:contentType)

The HTTP Content-Type used for the input file, in case it is a non-registered type.

Domain
jld:Option
Range
xsd:string
context (jld:context)

A context that is used for transforming the input document.

Domain
jld:Test
Range
rdfs:Resource
expand context (jld:expandContext)

A context that is used to initialize the active context when expanding a document.

Domain
jld:Option
Range
rdfs:Resource
extract all scripts (jld:extractAllScripts)

Whether to extract all script elements from HTML, or just the first encountered.

Domain
jld:Option
Range
xsd:boolean
input (jld:input)

Secondary input file

Domain
jld:Test
Range
rdfs:Resource
input (jld:frame)

A frame that is used for transforming the input document.

Domain
jld:Test
Range
rdfs:Resource
normative (jld:normative)

Indicates that this is or is not a test of a normative requirement. Tests without this option are treated as being normative.

Domain
jld:Option
Range
xsd:boolean
option (jld:option)

Options affecting processing

Domain
jld:Test
Range
jld:Option
processing mode (jld:processingMode)

If set to "json-ld-1.1", the JSON-LD processor must produce exactly the same results as the algorithms defined in this specification. If set to another value, the JSON-LD processor is allowed to extend or modify the algorithms defined in this specification to enable application-specific optimizations. The definition of such optimizations is beyond the scope of this specification and thus not defined. Consequently, different implementations may implement different optimizations. Developers must not define modes beginning with json-ld as they are reserved for future versions of this specification.

Domain
jld:Option
Range
xsd:string
processor feature (jld:processorFeature)

A particular processor feature that may be supported by some implementations.

Domain
jld:Option
Range
xsd:string
produce generalized RDF (jld:produceGeneralizedRdf)

Unless the produce generalized RDF flag is set to true, RDF triples containing a blank node predicate are excluded from output.

Domain
jld:Option
Range
xsd:boolean
redirect to (jld:redirectTo)

The location of a URL for redirection. A request made of the input file must be redirected to the designated URL.

Domain
jld:Option
Range
xsd:string
spec version (jld:specVersion)

Indicates the JSON-LD version to which the test applies, rather than the specific processing mode. Values are "json-ld-1.0", and "json-ld-1.1". If not set, the test is presumed to be valid for all versions of JSON-LD. In cases where results differ between spec versions for the same test, the test will have both a "1.0" and "1.1" version, for example.

Domain
jld:Option
Range
xsd:string
use JCS (jld:useJCS)

Requires the use of JSON Canonicalization Scheme when generating RDF literals from JSON literal values.

Domain
jld:Option
Range
xsd:boolean
use RDF types (jld:useRdfType)

If the use rdf type flag is set to true, statements with an rdf:type predicate will not use @type, but will be transformed as a normal property.

Domain
jld:Option
Range
xsd:boolean
use native types (jld:useNativeTypes)

If the use native types flag is set to true, RDF literals with a datatype IRI that equal xsd:integer or xsd:double are converted to a JSON numbers and RDF literals with a datatype IRI that equals xsd:boolean are converted to true or false based on their lexical form.

Domain
jld:Option
Range
xsd:boolean

Requirements

CompoundLiteral (jld:CompoundLiteral)

Optional test to serialize text direction using compound-literal

GeneralizedRdf (jld:GeneralizedRdf)

Test generates Generalized RDF

I18nDatatype (jld:I18nDatatype)

Optional test to serialize text direction using i18n-datatype