Upload
jose-emilio-labra-gayo
View
105
Download
0
Embed Size (px)
Citation preview
SHACL Test-Suite
Dimitris KontokostasUniversity of Leipzig
Jose Emilio Labra GayoWESO Research group
Test-suite web page
http://w3c.github.io/data-shapes/data-shapes-test-suite/
Structure of test-suite
Main foldermanifest.ttl => Includes other folders
Several folders with one or more manifest files tests tests/example tests/simple tests/algebra
Manifest fileFollows W3c standard practiceExamples: RDF Test Suite, Data Access WG
<> a mf:Manifest ; rdfs:label "Manifest Example file" ; mf:entries (<entry1> # ... ) .
<entry1> a sht:Validate ; mf:name "Validate simple RDF data" ; mf:action [ sht:schema <example-schema.shc> ; sht:schema-format sht:SHACLC ; sht:data <example-data.ttl> ; sht:data-format sht:TURTLE ; ] ; mf:result true ; mf:status sht:proposed .
Manifest file schema
Available at: http://w3c.github.io/data-shapes/data-shapes-test-suite/manifest.shc
<Manifest> { a ( mf:Manifest ) , rdfs:label xsd:string ?, dc:creator . ?, mf:entries @<ManifestEntryList> ?, mf:include IRI*}
<ManifestEntryList> { rdf:first @<ManifestEntry> , ( rdf:rest @<ManifestEntryList> | rdf:rest (rdf:nil) )}
Manifest Entries<ManifestEntry> { a ( # Possible types of tests sht:Validate # Validate data with a schema sht:MatchNodeShape # Match a node with a shape sht:WellFormedSchema # Well formed schema sht:NonWellFormedSchema # Non well formed schema sht:ConvertSchemaSyntax # Convert between different schema syntaxes ), mf:name xsd:string? # Optional name of this entry, mf:action @<ManifestAction> # Action to perform, mf:result . # The expected outcome, mf:status ( sht:proposed # A test that has been proposed sht:approved # A test that has been accepted sht:rejected # A test that has been rejected )}
Manifest Actions
<ManifestAction> { sht:schema IRI ?, sht:schema-format ( sht:SHACLC sht:TURTLE) ?, sht:data IRI ?, sht:data-format (sht:TURTLE ) ?, sht:schema-output-format ( sht:SHACLC sht:TURTLE ) ?, sht:schema-output IRI ?, sht:node IRI ?, sht:shape IRI ?}
Schema format
Conversion between Turtle and Compact formathttp://rdfshape.herokuapp.com
Example: Compact Syntax TURTLE http://goo.gl/xEsVzZ
TURTLE Compact Syntax http://goo.gl/Y7GOGB
Conclusions
The test-suite framework is availableWeb page:http://w3c.github.io/data-shapes/data-shapes-test-suite/
Github: https://github.com/w3c/data-shapes/tree/gh-pages/data-shapes-test-suite
We were waiting for the language constructs to be stable but we may start to add more tests
Questions for the WG
Process to add testsAdapt from existing tests:
http://shexspec.github.io/test-suite/ Eric's testsOther contributions?
Other types of tests?Tests about error messages?Tests about extension conditions?