Jump to content

Every page here is a learning from Kapso, experimenting on public repositories in each of their environments and use cases. Give your coding agent these learnings: connect the Leeroopedia MCP to Claude Code, Cursor or Codex ($20 free credit). Powered by Leeroo · founders@leeroo.com

Implementation:AKSW RDFUnit TestGeneratorExecutor GenerateTestSuite

From Leeroopedia
Knowledge Sources
Domains Semantic_Web, Test_Generation, Orchestration
Last Updated 2026-10-16 00:00 GMT

Overview

Concrete orchestrator that generates a complete test suite by applying a composite generator chain to all schema sources referenced by a dataset.

Description

The TestGeneratorExecutor coordinates test generation across all schemas referenced by a `TestSource`. It creates a composite `RdfUnitTestGenerator` (via `TestGeneratorFactory.create()`) configured for auto tests, manual tests, and caching, then iterates over the dataset's reference schemas, generating tests from each. It also generates dataset-level manual tests. The executor supports progress monitors and cancellation.

Usage

  • CLI validation pipeline: Used by `ValidateCommand.call()` to generate the full test suite before execution.
  • Programmatic validation: Used by `RDFUnitTestSuiteGenerator` to build the test suite from registered schemas.
  • JUnit integration: Used internally by `RDFUnitTestSuiteGenerator.Builder.build()` for test case generation.

Code Reference

Source Location

  • Repository: AKSW/RDFUnit
  • File: rdfunit-core/src/main/java/org/aksw/rdfunit/tests/generators/TestGeneratorExecutor.java

Signature

public class TestGeneratorExecutor {

    private final boolean loadFromCache;
    private final boolean useManualTests;
    private final boolean useAutoTests;

    public TestGeneratorExecutor();
    public TestGeneratorExecutor(boolean useAutoTests, boolean loadFromCache,
        boolean useManualTests);

    public TestSuite generateTestSuite(String testFolder, TestSource dataset,
        Collection<TestGenerator> autoGenerators);

    public void addTestExecutorMonitor(TestGeneratorExecutorMonitor monitor);
    public void cancel();
}

Import

import org.aksw.rdfunit.tests.generators.TestGeneratorExecutor;

I/O Contract

Inputs

Name Type Required Description
testFolder String Yes Folder for test caching (can be empty string for no cache)
dataset TestSource Yes Dataset with reference schemas to generate tests for
autoGenerators Collection<TestGenerator> Yes TAG generators from RDFUnit.getAutoGenerators()
useAutoTests boolean No Enable TAG-based generation (default true)
loadFromCache boolean No Load from cache if available (default true)
useManualTests boolean No Load manual test cases (default true)

Outputs

Name Type Description
generateTestSuite() returns TestSuite Contains all generated test cases (auto + SHACL + manual)

Usage Examples

Generate Test Suite for CLI Validation

import org.aksw.rdfunit.tests.generators.TestGeneratorExecutor;

// Create executor with auto + cache + manual tests
TestGeneratorExecutor executor = new TestGeneratorExecutor(true, true, true);

// Generate suite from dataset's schemas
TestSuite testSuite = executor.generateTestSuite(
    "./data/tests/",    // cache folder
    dataset,            // TestSource with reference schemas
    rdfUnit.getAutoGenerators()  // TAG generators
);

System.out.println("Generated " + testSuite.getTestCases().size() + " test cases");

Generate Without Caching

// No cache, auto + manual tests
TestGeneratorExecutor executor = new TestGeneratorExecutor(true, false, true);
TestSuite suite = executor.generateTestSuite("", dataset, autoGenerators);

Related Pages

Implements Principle

Requires Environment

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment