Name | Last modified | Size | Description | |
---|---|---|---|---|
Parent Directory | - | |||
Makefile | 2006-01-25 02:29 | 273 | ||
README.html | 2005-09-01 22:08 | 10K | ||
data/ | 2005-09-01 22:09 | - | ||
tools/ | 2009-10-13 14:17 | - | ||
$Revision: 1.2 $
Copyright © 2004 W3C® ( MIT, ERCIM, Keio), All Rights Reserved. W3C liability, trademark, and document use rules apply.
This document describes the protocol testing process used by the RDF Data Access Working Group.
Working Document.
The RDF Data Access Working Group (DAWG) uses a test-driven process. The test area is a live collection of the current and superceeded test cases of the working group.
Tests are divided into collection for manageability. For each collection of tests there is a "Manifest File" (it's called "Manifest.rdf" in the test collection directory). There is a master file listing all test collections in the top level of the test area.
Vocabulary: test-manifest (@@link when RDF/XML stable) (also: test-manitest.n3)
A manifest is a list (RDF Collection) of tests. The input data is specified in turtle:
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . @prefix mf: <http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#> . @prefix dawgt: <http://www.w3.org/2001/sw/DataAccess/tests/test-dawg#> . @prefix qt: <http://www.w3.org/2001/sw/DataAccess/tests/test-query#> . <> rdf;type mf:Manifest ; mf:entries ( .... )
and RDF/XML:
<rdf:RDF xmlns:mf="http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:dawgt="http://www.w3.org/2001/sw/DataAccess/tests/test-dawg#" xmlns:qt="http://www.w3.org/2001/sw/DataAccess/tests/test-query#"> <mf:Manifest rdf:about=""> <mf:entries rdf:parseType="Collection"> . . . . </mf:entries> </mf:Manifest> </rdf:RDF>
A test is an action and a result. The action is specificed by a resource as is the result. The action is performed and must result in a RDF graph (either the underlying feature does actually produce a graph or the result is encoded in some way. The result is a resource that refers to an RDF graph. A test passes if the graph from the action is logically equivalent to the graph named in the result. "Logical equivalence " can be tested by eliminating redundant bNodes in both graphs and testing if the graphs are isomorphic: same shape, same labels.
Tests will usually (not necessarily) be bNodes in the manifest file.
Example:
[ mf:name "test-S-01" ; # WG formal name of test rdfs:comment "A test with action and result as URI-labelled resources" ; mf:action <file:test-S-01> ; mf:result <file:result-S-01.n3> ]
Vocabulary: test-query (@@link when RDF/XML stable) (also: test-query.n3)
A query action requires two items: the query and the dataset. These may both come from the query itself (it may specify the RDf graph to query in the FROM clause) or it may need to be supplied externally. When provided externally in the action itself, the action will be a bNode with two properties:
[ mf:name "dawg-query-001" ; rdfs:comment "Optional triples: single optional triple case." ; mf:action [ qt:query <file:dawg-query-001> ; # File containing the query qt:data <file:dawg-data-01.n3> # Dataset ] ; mf:result <file:dawg-result-001.n3> # Expected results. ]
The dataset gives the exact graph against which the query is evaluated (no further inference is used to determine the input graph)
Testing whether two result sets are isomorphic is simpler than full graph isomorphism. Iterating over rows in one set, finding a match with the other set, removing this pair then making sure all rows are accounted for achives the same effect.
Vocabulary: test-dawg (@@link when RDF/XML stable) (also: test-dawg.n3)
To help and record DAWG processes, there is a vocabulary that reflects the Working Group processes. It is to be expected that this vocabulary will evolve as the working group refines its processes around test cases.
[ mf:name "dawg-query-001" ; rdfs:comment "Optional triples: single optional triple case." ; mf:action [ qt:query <file:dawg-query-001> ; # File containing the query qt:data <file:dawg-data-01.n3> # Dataset ] ; mf:result <file:dawg-result-001.n3> # Expected results. ]
Additional details of the tests: the expected type of the query and the expected form of the result can recorded to help test frameworks, given the difficultly and cost of providing a complete graph isomorphism comparison procedure.
[ mf:name "dawg-query-001" ; rdfs:comment "Optional triples: single optional triple case." ; mf:action [ qt:query <file:dawg-query-001> ; qt:data <file:dawg-data-01.n3> ] ; mf:result <file:dawg-result-001.n3> dawgt:queryForm dawgt:QuerySelect ; # Query is a SELECT query dawgt:resultForm dawgt:ResultSet ; # Result is a ResultSet (encoded as an RDF graph) ]
Properties exist for recording the DAWG testcase process:
dawgt:status | Status of the test: object is a defined term as below |
dawgt:approval | Pointer to the minutes approving the test |
dawgt:description | Descriptive summary of the test. |
dawgt:issue | Point to the issue the test is related to |
Defined terms for test status:
dawgt:NotClassified | |
dawgt:Approved | Tests implementations should pass. |
dawgt:Rejected | |
dawgt:Obsoleted | |
dawgt:Withdrawn |
[ mf:name "dawg-query-001" ; dawgt:status dawgt:Approved ; dawgt:approval <http://lists.w3.org/Archives/Public/public-rdf-dawg/2007Apr/1> ; dawgt:description "Example test case for the test case docuemntation" ; dawgt:issue <http://www.w3.org/2001/sw/DataAccess/issues.html#example> ; rdfs:comment "Optional triples: single optional triple case." ; mf:action [ qt:query <file:dawg-query-001> ; qt:data <file:dawg-data-01.n3> ] ; mf:result <file:dawg-result-001.n3> dawgt:queryForm dawgt:QuerySelect ; dawgt:resultForm dawgt:ResultSet ; ]