Skip to content

Patterns Generators

Dimitris Kontokostas edited this page Sep 26, 2015 · 6 revisions

Patterns

As discussed in the RDFUnit Overview we take a pattern-based approach to easily instantiate test cases. The patterns are defined as a Java resource but one can easily override them by setting his own patterns (or extending the existing ones) by setting the override file.

Test Generators

The generators are actually SPARQL queries that are used to instantiate patterns. In a similar approach, Test Generators are Java resources but can also be overriden in the '/data/' folder.

The Generators are run on the constraint definitions and taking one constraint at a time, they create bindings to patterns.

In the case of RDFS/OWL, when we read a vocabulary or ontology, we run the respective generators that identify axioms such as rdfs:domain, rdfs:range, OWL cardinality, functionality & disjointness constraints and for each axiom they create a binding to a pattern and instantiate a test case.

The approach is very flexible and can run on any type of constraints. As a proof of concept we also provide Test Generators for Dublin Core Description Set Profiles and IBM Resource (typed) Shapes.

At the moment we load & run all generators on runtime which this gives us the advantage to merge all supported constraints on a single execution. This means that someone could check his RDFS/OWL compatibility along with DSP or RS constraints.