SPARQL Protocol Test Suite Update

Hi all,

I wanted to update you on work I started to get a protocol test suite
going, any advice/direction is gladly welcomed. I mostly borrowed the work
that Andy/Steve had done on the QL test suite and followed that same

The test suite can be found at:

cvs -d co WWW/2001/sw/DataAccess/proto-tests

There are two folders: data contains the tests and tools contains the test
suite code written in python. In the tools directory, I have two main
scripts: and takes as input the protocol
spec and finds the examples by "pre" element's id and compares against the
test with the same id (not all tests are working). runs the tests
against a public service, I've only worked with Joseki3 (both locally and If you type make, it will run both the
and for you. At the moment, all examples in the spec exist as tests
in the suite.

The code requires Python 2.4.1 and Redland+Python bindings.

Here's an example test:

@prefix rdf: <> .
@prefix rdfs: <> .
@prefix ptest:
<> .
@prefix select:
<> .
@prefix example: <http://my.other.example/> .

<>  rdf:type ptest:Manifest ;
    rdfs:comment "SPARQL Protocol Examples" ;
    ptest:entries (

            ptest:name "select-svcsupplied" ;
            ptest:comment "SELECT with service-supplied RDF dataset" ;
            ptest:serviceDataSet [
                ptest:defaultGraph [
                    ptest:graphName example:books;
            ] ;
            ptest:query <svcsupplied-query.rq> ;
            ptest:acceptType "application/sparql-results+xml" ;
            ptest:preferredResult [
                ptest:result <svcsupplied-results.xml> ;
                ptest:resultCode "200" ;
                ptest:resultContentType "application/sparql-results+xml"

I'm not sure how about going on several things, but the first one of them
is graph locations. For example if you notice ptest:graphData in the
example test, I point to a publicly accessible URL because the test server
must have access to it in order to execute the query. I guess I could
parameterize the test suite to replace it, if you have your own local copy
of the test suite, for now I just point to the public copy.


Elias Torres

Received on Friday, 14 October 2005 15:02:59 UTC