This is a vocabulary document used to define classes and properties used in CSVW Test Cases and associated test manifests.
This vocabulary extends the RDF Test Vocabulary
and Test Manifest Vocabulary with CSVW-specific tests.
The URI of the vocabulary is http://www.w3.org/2013/csvw/tests/vocab#
(abbreviated by csvwt
in this document).
Turtle and JSON-LD versions of the vocabular are also available.
The vocabulary is published by the W3C CSV on the Web Working Group.
The vocabulary terms below constitute the complete CSVW Test vocabulary
A Negative Evaluation test is successful when the result of processing the input file specified as mf:action
results in an error or exception. The specifics of invoking test, including the interpretation of options (and other input files are specified through sub-class.
csvwt:Test
An error or exception should be generated when trying to generate JSON.
csvwt:NegativeEvaluationTest
rdft:TestEval
An error or exception should be generated when trying to generate RDF.
csvwt:NegativeEvaluationTest
rdft:TestEval
A NegativeValidationTest
takes an input file(mf:accept
) in text/csv or application/csvm+json format and validates it as described in the tabular-metadata and finds no errors. Validation tests are not required to have an associated result, only an action. A Negative Validation Test is passed when a processor validates the input and finds one or more errors.
csvwt:Test
Options passed to the test runner to affect invocation of the appropriate API method.
A Positive Evaluation test is successful when the result of processing the input file specified as mf:action
exactly matches the output file specified as mf:result
using the comparison defined in another class. The specifics of invoking test, including the interpretation of options and other input files are specified through a sub-class.
csvwt:Test
A PositiveValidationTest
takes an input file(mf:accept
) in text/csv or application/csvm+json format and validates it as described in the tabular-metadata and finds no errors. Validation tests are not required to have an associated result, only an action. A Positive Validation Test is passed when a processor validates the input and finds no validation errors.
csvwt:Test
All CSVW tests have an input file referenced using mf:action
. Positive and Negative Evaluation Tests also have a result file referenced using mf:result
. Other tests may take different inputs and options as defined for each test class.
mf:ManifestEntry
rdft:Test
A CsvToJsonTest
takes an input file (mf:accept
) in text/csv or application/csvm+json format to produce a an JSON file. The test entry MAY use :implicit
files, have user-specified :metadata
, and have a :httpLink
header defining a describedBy
relationship. Test Processors SHOULD act as if the file referenced via mf:action
is returned using such a link header if it is not included in the HTTP response. The expected results are compared using JSON object comparison with the processor output.
csvwt:PositiveEvaluationTest
Equivalent to ToJsonTest with the additional expectation that the processor emit one or more warnings.
csvwt:WarningEvaluationTest
rdft:TestEval
A ToRdfTest
takes an input file (mf:accept
) in text/csv or application/csvm+json format to produce a an RDF graph which is isomorphic to the graph generated from the result file (mf:result
) (see RDF-CONCEPTS). The test entry MAY use :implicit
files, have user-specified :metadata
, and have a :httpLink
header defining a describedBy
relationship. Test Processors SHOULD act as if the file referenced via mf:action
is returned using such a link header if it is not included in the HTTP response.
csvwt:PositiveEvaluationTest
rdft:TestEval
Equivalent to ToRdfTest with the additional expectation that the processor emit one or more warnings.
csvwt:WarningEvaluationTest
rdft:TestEval
A Warning Evaluation test is under the same criteria as PositiveEvaluationTest with the additional requirement that the processor generate one or more warnings after processing.
csvwt:Test
A WarningValidationTest
takes an input file(mf:accept
) in text/csv or application/csvm+json format and validates it as described in the tabular-metadata and finds warnings, but no errors. Validation tests are not required to have an associated result, only an action. A Warning Validation Test is passed when a processor validates the input, generates one or more warnings, and finds no validation errors.
csvwt:Test
The base IRI to use when expanding or compacting the document. If set, this overrides the input document's IRI.
csvwt:Test
rdfs:Resource
The HTTP Content-Type used for the input file, in case it is a non-registered type.
csvwt:Test
xsd:boolean
An HTTP Link header to be added to the result of requesting the input file.
csvwt:Test
xsd:boolean
The HTTP status code that must be returned when the input file is requested. This is typically used along with the redirectTo
property.
csvwt:Test
xsd:boolean
Implicit input files
csvwt:Test
rdfs:Resource
URL of User supplied metadata.
csvwt:Option
xsd:anyUri
Generate minimal vs. standard output.
csvwt:Option
xsd:boolean
Processor should run without generating optional provenance information.
csvwt:Option
xsd:boolean
Options affecting processing
csvwt:Test
csvwt:Option
The location of a URL for redirection. A request made of the input file must be redirected to the designated URL.
csvwt:Test
xsd:boolean