W3C

CSVW Test Vocabulary

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.

Vocabulary Terms

The vocabulary terms below constitute the complete CSVW Test vocabulary

Classes

csvwt:NegativeEvaluationTest
Negative Evaluation Test

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.

subClassOf: csvwt:Test
csvwt:NegativeJsonTest
Negative JSON Test

An error or exception should be generated when trying to generate JSON.

subClassOf:
  • csvwt:NegativeEvaluationTest
  • rdft:TestEval
csvwt:NegativeRdfTest
Negative RDF Test

An error or exception should be generated when trying to generate RDF.

subClassOf:
  • csvwt:NegativeEvaluationTest
  • rdft:TestEval
csvwt:NegativeValidationTest
Negative Validation Test

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.

subClassOf: csvwt:Test
csvwt:Option
Processor Options

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

csvwt:PositiveEvaluationTest
Positive Evaluation Test

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.

subClassOf: csvwt:Test
csvwt:PositiveValidationTest
Positive Validation 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.

subClassOf: csvwt:Test
csvwt:Test
Superclass of all CSVW tests

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.

subClassOf:
  • mf:ManifestEntry
  • rdft:Test
csvwt:ToJsonTest
To JSON 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.

subClassOf: csvwt:PositiveEvaluationTest
csvwt:ToJsonTestWithWarnings
To JSON Test with warnings

Equivalent to ToJsonTest with the additional expectation that the processor emit one or more warnings.

subClassOf:
  • csvwt:WarningEvaluationTest
  • rdft:TestEval
csvwt:ToRdfTest
To RDF Test

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.

subClassOf:
  • csvwt:PositiveEvaluationTest
  • rdft:TestEval
csvwt:ToRdfTestWithWarnings
To RDF Test with warnings

Equivalent to ToRdfTest with the additional expectation that the processor emit one or more warnings.

subClassOf:
  • csvwt:WarningEvaluationTest
  • rdft:TestEval
csvwt:WarningEvaluationTest
Warning Evaluation Test

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.

subClassOf: csvwt:Test
csvwt:WarningValidationTest
Warning Validation 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.

subClassOf: csvwt:Test

Properties

csvwt:base
base

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

domain: csvwt:Test
range: rdfs:Resource
csvwt:contentType
content type

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

domain: csvwt:Test
range: xsd:boolean
csvwt:httpLink
HTTP link

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

domain: csvwt:Test
range: xsd:boolean
csvwt:httpStatus
HTTP status

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

domain: csvwt:Test
range: xsd:boolean
csvwt:implicit
implicit

Implicit input files

domain: csvwt:Test
range: rdfs:Resource
csvwt:metadata
Metadata

URL of User supplied metadata.

domain: csvwt:Option
range: xsd:anyUri
csvwt:minimal
Minimal

Generate minimal vs. standard output.

domain: csvwt:Option
range: xsd:boolean
csvwt:noProv
No Provenance

Processor should run without generating optional provenance information.

domain: csvwt:Option
range: xsd:boolean
csvwt:option
option

Options affecting processing

domain: csvwt:Test
range: csvwt:Option
csvwt:redirectTo
redirect to

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

domain: csvwt:Test
range: xsd:boolean