Principle:AKSW RDFUnit Test Suite Orchestration
| Knowledge Sources | |
|---|---|
| Domains | Semantic_Web, Testing, Software_Architecture |
| Last Updated | 2026-10-16 00:00 GMT |
Overview
Design pattern for combining multiple heterogeneous test generation strategies—pattern-based, SHACL, and manually-defined—into a single unified test suite with caching support.
Description
Test Suite Orchestration is the architectural principle that allows RDFUnit to produce comprehensive validation coverage by composing independent test generators. Rather than relying on a single generation strategy, the orchestrator chains multiple generators:
- TAG-based generators: Auto-generate tests from OWL schema introspection (see Principle:AKSW_RDFUnit_Pattern_Based_Test_Generation).
- SHACL generators: Convert SHACL shapes into test cases (see Principle:AKSW_RDFUnit_SHACL_Constraint_Validation).
- Manual test readers: Load pre-defined test cases bundled for known vocabularies (SKOS, DBpedia, etc.).
- Cache generators: Load pre-generated tests from disk if available, or generate and cache on first run.
The orchestrator applies each generator to every schema source referenced by the dataset, collects all generated test cases into a single `TestSuite`, and supports progress monitoring and cancellation. The composite pattern allows generators to be composed in chains (e.g., cache → generate-and-cache → tag) with first-success semantics for efficient caching.
Usage
Use this principle when you need to validate RDF data against multiple schema types simultaneously. The orchestrator handles the complexity of combining heterogeneous generators. In the CLI, this is controlled by flags: `-A` (disable auto tests), `-M` (disable manual tests), `-C` (disable cache). In the API, use `TestGeneratorFactory.create()` or `TestGeneratorExecutor` directly.
Theoretical Basis
The orchestration follows the Composite pattern:
# Abstract algorithm
generators = []
if use_auto_tests:
if load_from_cache:
generators.append(CacheOrGenerate(tag_generator, cache_folder))
else:
generators.append(tag_generator)
generators.append(shacl_generator)
generators.append(manual_test_reader)
composite = CompositeGenerator(generators)
all_tests = []
for schema in dataset.schemas:
all_tests += composite.generate(schema)
all_tests += composite.generate(dataset) # manual tests for the dataset itself
return TestSuite(all_tests)
The composite generator delegates `generate()` to each child generator and concatenates results. The cache generator uses first-success semantics: if cached tests exist on disk, load them; otherwise, generate and persist to cache.