-
Notifications
You must be signed in to change notification settings - Fork 41
Gustavo Publio edited this page Sep 27, 2017
·
6 revisions
A simple way to use RDFUnit in you code is the following:
First, generate your test cases based on a schema and get a TestSuite
TestSuite testSuite = new RDFUnitTestSuiteGenerator.Builder()
.addSchemaURI("skos", "http://www.w3.org/2004/02/skos/core#")
.addSchemaURI("foaf", "http://xmlns.com/foaf/0.1/")
.build().getTestSuite()
this will generate all the necessary TestCases for the schemas we provide and return a TestSuite. You can use OWL, SHACL, RS & DSP constraints here.
Then, you can use the testSuite with the static functions of RDFUnitStaticValidator and get back a TestExecution to see the results.
the rdfunit-examples module contains some sample code you can use
-
rdfunit-coreprovides the core RDFUnit functionality -
rdfunit-model(in progress) interfaces & classes for RDFUnit / SHACL constructs -
rdfunit-validatewrapper module used to provide CLI support and a simple web service interface -
rdfunit-junitprovides a custom RDFUnit-JUnit runner that can ease RDF unit testing -
rdfunit-webdemois the code used to create http://rdfunit.aksw.org/demo/ -
rdfunit-manual-testscontains community-provided tests cases that can be reused for specific ontologies / datasets. For example it provides SKOS tests, not defined in the SKOS rdfs definitions.