W3C Test Suites
Trigo includes infrastructure for running both the official W3C SPARQL 1.1 test suite and W3C RDF 1.1/1.2 test suites to validate compliance with SPARQL and RDF standards.
Setup
The W3C test suite is included as a git submodule:
# Clone with submodules
git clone --recursive https://github.com/aleksaelezovic/trigo.git
# Or initialize submodules after cloning
git submodule update --init --recursive
Test Suite Structure
The test suite is located in testdata/rdf-tests/ and includes:
- sparql10/ - SPARQL 1.0 tests
- sparql11/ - SPARQL 1.1 Query and Update tests
- sparql12/ - SPARQL 1.2 tests
- rdf/rdf11/ - RDF 1.1 parser tests (Turtle, N-Triples, N-Quads, TriG, RDF/XML)
- rdf/rdf12/ - RDF 1.2 parser tests (with RDF-star support)
Test Categories
Tests are organized by feature:
sparql11/
├── syntax-query/ # Query syntax (positive/negative)
├── syntax-update/ # Update syntax tests
├── aggregates/ # COUNT, SUM, AVG, etc.
├── bind/ # BIND clause
├── bindings/ # VALUES clause
├── construct/ # CONSTRUCT queries
├── exists/ # EXISTS and NOT EXISTS
├── functions/ # Built-in functions
├── grouping/ # GROUP BY
├── negation/ # MINUS, FILTER NOT EXISTS
├── property-path/ # Property paths
├── subquery/ # Subqueries
└── ...
Running Tests
Build the Test Runner
go build -o test-runner ./cmd/test-runner
Run Specific Test Suite
# Run SPARQL syntax tests
./test-runner testdata/rdf-tests/sparql/sparql11/syntax-query
# Run a specific SPARQL manifest
./test-runner testdata/rdf-tests/sparql/sparql11/syntax-query/manifest.ttl
# Run RDF parser tests
./test-runner testdata/rdf-tests/rdf/rdf11/rdf-turtle # Turtle parser tests
./test-runner testdata/rdf-tests/rdf/rdf11/rdf-n-triples # N-Triples parser tests
./test-runner testdata/rdf-tests/rdf/rdf11/rdf-n-quads # N-Quads parser tests
./test-runner testdata/rdf-tests/rdf/rdf11/rdf-trig # TriG parser tests
./test-runner testdata/rdf-tests/rdf/rdf11/rdf-xml # RDF/XML parser tests
# Run RDF 1.2 parser tests
./test-runner testdata/rdf-tests/rdf/rdf12/rdf-turtle # RDF 1.2 Turtle tests
./test-runner testdata/rdf-tests/rdf/rdf12/rdf-n-triples # RDF 1.2 N-Triples tests
./test-runner testdata/rdf-tests/rdf/rdf12/rdf-trig # RDF 1.2 TriG tests
Example Output
📋 Running manifest: testdata/rdf-tests/sparql/sparql11/syntax-query/manifest.ttl
Found 94 tests
✅ PASS: syntax-construct-where-02.rq
❌ FAIL: syntax-aggregate-01.rq
⏭️ SKIP: syntax-update-01.ru
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📊 TEST SUMMARY
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Total: 94
Passed: 29 (30.9%)
Failed: 64
Skipped: 1
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Test Types
SPARQL Test Types
Positive Syntax Tests
Verify that valid SPARQL queries parse successfully:
:test1 rdf:type mf:PositiveSyntaxTest11 ;
mf:name "Basic SELECT" ;
mf:action <query.rq> .
Negative Syntax Tests
Verify that invalid queries are rejected:
:test2 rdf:type mf:NegativeSyntaxTest11 ;
mf:name "Invalid WHERE" ;
mf:action <bad-query.rq> .
Query Evaluation Tests
Execute queries against data and compare results:
:test3 rdf:type mf:QueryEvaluationTest ;
mf:name "Basic BGP" ;
mf:action [
qt:query <query.rq> ;
qt:data <data.ttl>
] ;
mf:result <result.srx> .
RDF Test Types
Positive Syntax Tests
Verify that RDF documents parse successfully:
:test1 rdf:type rdft:TestTurtlePositiveSyntax ;
mf:name "Basic Turtle" ;
mf:action <data.ttl> .
Negative Syntax Tests
Verify that invalid RDF documents are rejected:
:test2 rdf:type rdft:TestTurtleNegativeSyntax ;
mf:name "Invalid Turtle" ;
mf:action <bad-data.ttl> .
Evaluation Tests
Parse RDF documents and compare with expected triples:
:test3 rdf:type rdft:TestTurtleEval ;
mf:name "Complex Turtle" ;
mf:action <input.ttl> ;
mf:result <expected.nt> .
Current Test Support
RDF Parser Tests (RDF 1.1 & 1.2)
Implemented Formats
- Turtle: Full parser with PREFIX/BASE, property lists, collections
- Pass rate varies by test suite
- Some advanced features may not be fully compliant
- N-Triples: 100% pass rate (70/70 tests)
- Complete strict N-Triples validation
- All validation rules enforced
- N-Quads: Supports named graphs with quad parsing
- Extends N-Triples with graph names
- TriG: Turtle + named graph blocks
- GRAPH blocks and default graph support
- Some edge cases may not be handled
- RDF/XML: rdf:Description, properties, datatypes, nested blank nodes
- Common patterns supported
- Advanced features like parseType may be limited
- JSON-LD: @context, @id, @value, @type, @language
- Basic JSON-LD patterns supported
- Full context processing not yet implemented
Test Results
- rdf11/rdf-turtle: 100% pass rate (313/313 tests)
- Basic triples, PREFIX/BASE, property lists, Unicode escapes
- Single/double/triple-quote literals, numeric literals, boolean literals
- Lexical form preservation for numeric literals (exponents, signs, leading zeros)
- Full Unicode support for prefixed names, blank node labels (PN_CHARS, combining marks)
- Unicode-aware 'a' keyword detection
- Anonymous blank nodes [], empty collections ()
- Collections with items (RDF list expansion via rdf:first/rdf:rest/rdf:nil)
- Blank node property lists with multiple predicates and objects
- Keyword position validation: 'a', 'true', 'false' restricted to valid positions
- @base directive and relative IRI resolution
- Repeated semicolons, PName escape sequences (\_\~\.\-\!\$ etc.)
- rdf11/rdf-n-triples: 100% pass rate (70/70 tests)
- Strict N-Triples validation (no PREFIX/BASE, no abbreviations, no bare literals)
- Complete IRI validation with Unicode escape support
- Proper escape sequence validation (only \t, \b, \n, \r, \f, \\, \", \uXXXX, \UXXXXXXXX)
- Absolute IRI requirement enforced (no relative IRIs)
- All negative syntax tests passing
- rdf11/rdf-n-quads: 100.0% pass rate (87/87 tests)
- Strict N-Quads validation (same as N-Triples + optional graph component)
- Complete IRI validation in all positions including graph names
- Language tag validation (must start with letter)
- All negative syntax tests passing
- rdf11/rdf-trig: 100.0% pass rate (356/356 tests)
- Anonymous graph blocks
{ triples } - Named graph blocks
<iri> { triples }and_:bnode { triples } - GRAPH keyword syntax
GRAPH <iri> { triples } - Delegates triple parsing to Turtle parser (47.2% → 89.9% with Turtle improvements)
- Global blank node counter across graph blocks ensures unique blank node IDs
- Collections and blank node property lists fully supported
- Keyword position validation inherited from Turtle parser
- Repeated semicolons, PName escape sequences, numeric literals, Unicode support
- Anonymous graph blocks
- rdf11/rdf-xml: 100% pass rate (166/166 tests)
- Basic rdf:Description, simple properties
- RDF containers (rdf:Bag, rdf:Seq, rdf:Alt) with blank node subjects
- Auto-numbered rdf:li elements (rdf:_1, rdf:_2, ...)
- Explicit rdf:_N properties
- xml:base for base URI resolution
- rdf:ID attribute handling with document base URI
- Property attributes on rdf:Description elements
- rdf:parseType="Resource" for blank node objects
- Property attributes on property elements (creates blank nodes)
- Document base URI support (W3C canonical URIs for test files)
- Blank node isomorphism (affects many tests), reification, negative test validation
- rdf12/rdf-n-triples: 100% pass rate (140/140 tests) ✅
- Full RDF 1.2 N-Triples compliance achieved
- Triple terms <<( s p o )>> as objects only
- Language direction tags (e.g., @en--ltr, @ar--rtl) with rdf:dirLangString
- BCP 47 language tag validation (primary tag max 8 characters)
- Strict validation: rejects Turtle syntax (annotations, reifiers, quoted triples)
- Quoted triple validation (predicate must be IRI, no blank nodes)
- rdf12/rdf-n-quads: 100% pass rate (155/155 tests) ✅
- Full RDF 1.2 N-Quads compliance achieved
- Triple terms <<( s p o )>> restricted to object position
- Language direction support in all graph contexts
- Graph component blank node handling with triple terms
- Language tag validation including datatype restrictions (rdf:langString/dirLangString)
- C14N canonicalization for N-Quads output
- rdf12/rdf-turtle: 100% pass rate (405/405 tests) ✅
- Full RDF 1.2 Turtle compliance achieved
- Quoted triples with auto-reification: << s p o >> generates blank node + rdf:reifies
- Annotation syntax {| predicate object |} for metadata on triples
- Nested annotations with recursive parsing
- Reifier syntax ~ identifier for explicit reification IDs
- Empty reifiers ~ (generates blank node)
- VERSION/@version directives for RDF version declaration
- Language direction: @lang--dir (e.g., @ar--rtl)
- Triple deduplication (RDF is a set)
- QuotedTriple auto-reification in subject/object positions
- ReifiedTriple with explicit identifiers
- All functional tests passing (3 skipped: C14N output format tests)
- rdf12/rdf-trig: 100% pass rate (416/416 tests) ✅
- Full RDF 1.2 TriG compliance achieved
- Inherits all RDF 1.2 Turtle features (quoted triples, annotations, reifiers)
- Named graph blocks with RDF 1.2 syntax
- Annotation block {| |} parsing for multiple alternating reifiers
- Graph isomorphism for nested blank nodes in quoted triples
- C14N canonicalization for TriG output
- rdf12/rdf-xml: 100% pass rate (196/196 tests) ✅
- Full RDF 1.2 RDF/XML compliance achieved
- Language direction support (ITS namespace): its:dir attribute with version-aware handling
- Direction tags formatted as @lang--dir (e.g., @en--ltr, @ar--rtl)
- Element stack for inherited xml:lang and its:dir attributes
- Language direction support complete (rdf:version="1.2" checking implemented)
- rdf:parseType="Triple" fully implemented with nested triple term support
- Graceful RDF 1.1 fallback (skips parseType="Triple" in 1.1 mode)
- rdf:annotation and rdf:annotationNodeID complete across all property paths
- Annotation support in parseType="Resource", nested Descriptions, and property elements
- C14N canonicalization support for RDF/XML output
Recent Improvements (Phase 1):
- Fixed manifest parser to correctly identify test types (improved N-Quads detection)
- Added comprehensive Unicode escape sequence support (\uXXXX, \UXXXXXXXX)
- Added single-quote and triple-quote literal support (''', """)
- Implemented anonymous blank nodes [] and empty collections ()
- Added @base directive with relative IRI resolution (RFC 3986)
- Implemented numeric literals (integers, decimals with proper xsd:decimal type, doubles with scientific notation)
- Added boolean literal support (true/false with xsd:boolean type)
- Turtle compliance improved: 44.4% → 62.2% (+17.8 percentage points, +45 tests)
Recent Improvements (Phase 3 - Graph Isomorphism & SPARQL Results):
- Turtle/TriG Quick Wins (Numeric Formatting, Semicolons, Escapes):
- Fixed numeric literal formatting to preserve trailing zeros (.0)
- Added support for repeated semicolons in property lists
- Implemented PName escape sequences (\_\~\.\-\!\$ etc.)
- Turtle: 66.2% → 70.3% (+4.1pp, +12 tests)
- TriG: 66.9% → 70.4% (+3.5pp, +12 tests)
- Literal Lexical Form Preservation:
- Fixed boolean literal parsing (matchKeyword already advances position)
- Preserve original lexical form for numeric literals (1E0, +1, 01, etc.)
- Applied same fixes to both Turtle and TriG parsers
- Turtle: 70.3% → 74.0% (+3.7pp, +11 tests)
- TriG: 70.4% → 73.7% (+3.3pp, +11 tests)
- Unicode Character Support (PN_CHARS):
- Implemented full Unicode character validation per Turtle spec (PN_CHARS_BASE, PN_CHARS_U, PN_CHARS)
- Support combining marks, diacritics, and full Unicode range in prefixed names and blank nodes
- UTF-8 aware 'a' keyword detection to handle Unicode prefixes correctly
- Proper handling of '.' character in prefix/blank node names (allowed in middle, not at end)
- Turtle: 74.0% → 75.0% (+1.0pp, +3 tests)
- TriG: 73.7% → 74.0% (+0.3pp, +1 test)
- Collections and Blank Node Property Lists:
- Implemented full RDF collection parsing with expansion to rdf:first/rdf:rest/rdf:nil linked list structure
- Support for nested collections and collections in subject/object positions
- Implemented blank node property list syntax
[ pred obj ]with multiple predicates and objects - Refactored parser architecture with extraTriples field to support constructs that generate multiple triples
- Global blank node counter in TriG parser ensures unique blank node IDs across graph blocks
- Turtle: 75.0% → 80.4% (+5.4pp, +16 tests)
- TriG: 74.0% → 78.8% (+4.8pp, +16 tests)
- Keyword Position Validation:
- Implemented strict validation for Turtle keyword usage in subject/predicate/object positions
- Keyword 'a' (rdf:type) now only valid as predicate, rejected as subject or object
- Boolean literals 'true' and 'false' rejected as subjects or predicates (only valid as objects)
- All literals properly rejected as subjects or predicates per RDF specification
- Validation applied to both regular triples and blank node property lists
- Turtle: 80.4% → 93.9% (+13.5pp, +40 tests in this phase)
- TriG: 78.8% → 89.9% (+11.1pp, +37 tests in this phase)
- Number Literals and IRI Resolution:
- Extended number parsing to support edge cases: leading decimal points (.1, +.7, -.2e3)
- Support for exponents without fraction part (123.E+1)
- Fixed BASE directive validation: enforce case-sensitive @base with optional '.', reject '.' after SPARQL-style BASE
- Added fragment-only IRI support (#, #foo) without requiring base URI
- Improved prefixed name parsing: break on comments (#) and collection terminators ()
- Turtle: 93.9% → 97.0% (+3.1pp, +9 tests in this phase)
- RFC 3986 IRI Resolution:
- Implemented full RFC 3986 path normalization (remove . and .. segments)
- Added SetBaseURI() method to Turtle and TriG parsers for document base URI
- Fixed relative IRI resolution to always use base when available
- Fragment-only prefixes (@prefix : <#>) now resolve against document URI
- Proper handling of . (current directory) and .. (parent directory) with trailing slashes
- Query and fragment components preserved during path normalization
- Turtle: 97.0% → 98.6% (+1.6pp, +5 tests in this phase)
- TriG: 89.9% → 94.0% (+4.1pp, +14 tests in this phase)
- Negative Evaluation Tests:
- Implemented semantic IRI validation for negative evaluation tests
- Parser allows syntactically valid but semantically invalid IRIs
- Validates RFC 3987 compliance: rejects space, angle brackets, curly braces, etc. in IRIs
- Tests check Unicode escapes that produce invalid characters (\u0020 for space, \u003C for <)
- Distinguishes between syntax errors (fail during parsing) and semantic errors (fail during validation)
- Turtle: 98.6% → 100% (+1.4pp, +4 tests - PERFECT SCORE)
- Graph Isomorphism for Blank Nodes:
- Implemented VF2-inspired backtracking algorithm for blank node matching
- Properly compares RDF graphs despite different blank node labels
- Fixed 30 tests across Turtle, RDF/XML, and TriG formats
- Turtle: 62.2% → 66.2% (+4.0pp, +12 tests)
- RDF/XML: 38.8% → 69.3% (+30.5pp, +51 tests)
- TriG: 46.0% → 66.9% (+20.9pp, +70 tests)
- SPARQL CSV/TSV Result Serialization:
- Implemented W3C-compliant CSV and TSV result format serialization
- Canonical blank node labeling (a, b, c... for CSV; b0, b1, b2... for TSV)
- Proper double formatting with scientific notation (1.0E6 for CSV, 1.0e6 for TSV)
- Datatype handling: skip for basic XSD types, preserve for derived types
- CSV/TSV tests: 0% → 83.3% (5/6 tests passing)
Recent Improvements (Phase 4 - RDF 1.2 Enhancements):
- Graph Isomorphism for Nested Blank Nodes:
- Fixed isConsistentSoFar() to recursively check blank nodes in RDF 1.2 structures
- Added isTermFullyMapped() helper for TripleTerm, QuotedTriple, and ReifiedTriple
- Properly validates partial mappings before continuing backtracking
- Turtle 1.2: 99.0% → 99.3% (+0.3pp, +1 test)
- All functional Turtle 1.2 tests now passing (3 skipped: C14N output)
- RDF/XML Language Direction Support (ITS Namespace):
- Added ITS namespace constant (http://www.w3.org/2005/11/its)
- Implemented element stack tracking for xml:lang and its:dir inheritance
- Populate Direction field in Literal when both lang and dir are present
- Skip ITS namespace attributes when checking for property attributes
- Format language tags as @lang--dir (e.g., @en--ltr, @ar--rtl)
- RDF/XML 1.2: 84.3% → 86.4% (+2.1pp, +4 tests)
- Direction tests: 5 of 6 passing (dir-02 requires rdf:version="1.2" checking)
Recent Improvements (Phase 2 - TriG & RDF/XML):
- TriG Parser Enhancements:
- Implemented anonymous graph blocks
{ triples } - Implemented named graph blocks
<iri> { triples }and_:bnode { triples } - Added lookahead parsing to distinguish graph blocks from regular triples
- TriG compliance improved: 32.2% → 46.0% (+13.8 percentage points, +46 tests)
- Implemented anonymous graph blocks
- RDF/XML Parser Enhancements (Phase 2a):
- Implemented RDF containers (rdf:Bag, rdf:Seq, rdf:Alt)
- Added auto-numbered rdf:li element support (rdf:_1, rdf:_2, etc.)
- Implemented explicit rdf:_N property handling
- Added xml:base tracking for base URI resolution
- Implemented rdf:ID attribute handling with base URI concatenation
- Added property attribute support on rdf:Description elements
- Implemented typed node parsing (elements with implicit rdf:type)
- RDF/XML Parser Enhancements (Phase 2b):
- Added rdf:parseType="Resource" support for blank node objects
- Implemented document base URI with SetBaseURI() method
- Test runner now provides W3C canonical URIs for test files
- Added property attributes on property elements (structured values)
- Proper xml: namespace attribute filtering (xml:lang, xml:space, etc.)
- RDF/XML compliance improved: 20.6% → 38.8% (+18.2 percentage points, +26 tests)
Syntax Tests (Parser Validation)
- Pass Rate: 69.1% (65/94 tests in syntax-query suite)
- All SELECT expression tests (5/5)
- All aggregate syntax tests (15/15)
- All IN/NOT IN tests (3/3)
- EXISTS/NOT EXISTS parsing
- Property list shorthand (semicolon/comma)
- Boolean literals (true/false)
SPARQL Execution Tests (End-to-End Validation)
Implemented and Validated
- BIND expressions: 70.0% pass rate (7/10 tests)
- Basic BIND with expressions
- BIND variables in subsequent patterns
- FILTER on BIND variables
- Known limitations: UNION scoping, forward references
- CONSTRUCT queries: 28.6% pass rate (2/7 tests)
- Template instantiation
- CONSTRUCT WHERE shorthand
- N-Triples output
- CSV/TSV Result Formats: 83.3% pass rate (5/6 tests)
- CSV format with canonical blank node labels
- TSV format with proper datatype suffixes
- Scientific notation formatting for doubles
- Known limitation: datatype preservation through executor
- Basic graph patterns: Full support
- Triple patterns with variables
- Nested loop joins
- Join ordering optimization
- Query modifiers: Full support
- DISTINCT (hash-based deduplication)
- LIMIT and OFFSET
- ORDER BY (ASC/DESC)
- Complex patterns: Full support
- OPTIONAL (left outer join)
- UNION (pattern alternation)
- MINUS (set difference)
- GRAPH (named graph queries)
- FILTER expressions: 20+ operators and functions
- Logical operators (&&, ||, !)
- Comparison operators (=, !=, <, >, <=, >=)
- Arithmetic operators (+, -, *, /)
- IN/NOT IN operators
- String functions (STRLEN, SUBSTR, UCASE, LCASE, CONCAT, CONTAINS, STRSTARTS, STRENDS)
- Type checking (BOUND, isIRI, isBlank, isLiteral, isNumeric)
- Numeric functions (ABS, CEIL, FLOOR, ROUND)
Parsed But Not Executed
- EXISTS/NOT EXISTS: Parser complete, evaluation TODO
- Aggregates: Syntax supported (COUNT, SUM, AVG, MIN, MAX, GROUP_CONCAT, SAMPLE)
- GROUP BY: Parsed with variables and expressions
- HAVING: Parsed with filter conditions
- DESCRIBE: Parser complete, execution TODO
Not Yet Implemented
- VALUES clause
- Subqueries (detected but not parsed)
- Property paths
- REGEX function
- Date/time functions
- Hash functions (MD5, SHA1, etc.)
- UPDATE operations
- Service federation
Implementation Details
Test Runner Architecture
Test Runner
↓
Manifest Parser (.ttl files)
↓
Test Evaluator
↓
├─ SPARQL Syntax Tests → SPARQL Parser
├─ SPARQL Evaluation Tests → Full Pipeline:
│ ├─ Turtle Parser (load test data)
│ ├─ SPARQL Parser (parse query)
│ ├─ Optimizer (build execution plan)
│ ├─ Executor (run query)
│ ├─ SPARQL XML Parser (parse expected results)
│ └─ Result Comparator (validate correctness)
├─ RDF Positive Syntax Tests → RDF Parser (validate parse success)
├─ RDF Negative Syntax Tests → RDF Parser (validate parse failure)
├─ RDF Evaluation Tests → RDF Parser + Triple Comparator
│ ├─ Parse input RDF (Turtle/TriG/RDF-XML/JSON-LD)
│ ├─ Parse expected N-Triples output
│ └─ Compare triples (order-independent, blank node handling)
└─ SPARQL Update Tests → (TODO)
Key Components
Turtle Parser (pkg/rdf/turtle.go):
- Loads RDF test data from
.ttlfiles - Supports PREFIX/BASE declarations
- Handles IRIs, blank nodes, literals
- Supports datatypes and language tags
- Sufficient for W3C test data files
SPARQL XML Parser (pkg/server/results/xml.go):
- Parses expected results from
.srxfiles - Converts to RDF term bindings
- Supports all RDF term types
- Enables order-independent result comparison
Query Evaluation (internal/testsuite/runner.go):
- Clear store between tests
- Load test data using Turtle parser
- Parse SPARQL query
- Optimize query plan
- Execute query with full pipeline
- Parse expected results
- Compare actual vs expected (order-independent)
Manifest Format
Manifests are Turtle files describing tests:
@prefix mf: <http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#> .
@prefix qt: <http://www.w3.org/2001/sw/DataAccess/tests/test-query#> .
<> rdf:type mf:Manifest ;
mf:entries (
:test1
:test2
) .
:test1 a mf:PositiveSyntaxTest11 ;
mf:name "Test Name" ;
mf:action <query-file.rq> .
Adding Test Support
To add support for a new test type:
- Update Manifest Parser (
internal/testsuite/manifest.go)- Add new
TestTypeconstant - Update parser to recognize new test type
- Add new
- Implement Test Evaluator (
internal/testsuite/runner.go)- Add case in
runTest()switch - Implement evaluation function
- Add case in
- Add Required Features (if needed)
- Extend parser for new syntax
- Add optimizer support
- Implement executor operators
Testing Philosophy
The W3C SPARQL test suite serves multiple purposes:
- Compliance Validation - Ensure standard conformance
- Regression Testing - Catch breaking changes
- Feature Tracking - Identify gaps in implementation
- Documentation - Tests demonstrate expected behavior
Integration with CI/CD
GitHub Actions Example
name: SPARQL Tests
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: actions/setup-go@v4
with:
go-version: '1.21'
- name: Build Test Runner
run: go build -o test-runner ./cmd/test-runner
- name: Run Syntax Tests
run: ./test-runner testdata/rdf-tests/sparql/sparql11/syntax-query
References
- W3C SPARQL 1.1 Test Cases
- RDF Test Suite Repository
- SPARQL 1.1 Query Specification
- Test Manifest Vocabulary
Future Improvements
- Complete evaluation test support
- Add UPDATE test support
- Improve datatype preservation through SPARQL executor
- Support federated query tests
- Generate HTML test reports
- Track compliance percentage over time
- Add benchmarking for performance tests
Contributing
When adding new SPARQL features:
- Run relevant test suite section
- Document pass rate in commit message
- Create issues for failing tests
- Update this document with current status