Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Data shapes-test-suite

882 views

Published on

Presentation for the F2F meeting group

Published in: Engineering
  • Login to see the comments

  • Be the first to like this

Data shapes-test-suite

  1. 1. SHACL Test-Suite Dimitris Kontokostas University of Leipzig Jose Emilio Labra Gayo WESO Research group
  2. 2. Test-suite web page http://w3c.github.io/data-shapes/data-shapes-test-suite/
  3. 3. Structure of test-suite Main folder manifest.ttl => Includes other folders Several folders with one or more manifest files tests tests/example tests/simple tests/algebra
  4. 4. Manifest file Follows W3c standard practice Examples: 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 .
  5. 5. 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) ) }
  6. 6. 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 ) }
  7. 7. 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 ? }
  8. 8. Schema format Conversion between Turtle and Compact format http://rdfshape.herokuapp.com Example: Compact Syntax  TURTLE http://goo.gl/xEsVzZ TURTLE  Compact Syntax http://goo.gl/Y7GOGB
  9. 9. Conclusions The test-suite framework is available Web 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
  10. 10. Questions for the WG Process to add tests Adapt from existing tests: http://shexspec.github.io/test-suite/ Eric's tests Other contributions? Other types of tests? Tests about error messages? Tests about extension conditions?

×