10
SHACL Test-Suite Dimitris Kontokostas University of Leipzig Jose Emilio Labra Gayo WESO Research group

Data shapes-test-suite

Embed Size (px)

Citation preview

Page 1: Data shapes-test-suite

SHACL Test-Suite

Dimitris KontokostasUniversity of Leipzig

Jose Emilio Labra GayoWESO Research group

Page 2: Data shapes-test-suite

Test-suite web page

http://w3c.github.io/data-shapes/data-shapes-test-suite/

Page 3: 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

Page 4: Data shapes-test-suite

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 .

Page 5: Data shapes-test-suite

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) )}

Page 6: Data shapes-test-suite

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 )}

Page 7: Data shapes-test-suite

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 ?}

Page 8: Data shapes-test-suite

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

Page 9: Data shapes-test-suite

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

Page 10: Data shapes-test-suite

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?