W3C home > Mailing lists > Public > public-rdf-dawg@w3.org > July to September 2005

Re: Example protocol test

From: Seaborne, Andy <andy.seaborne@hp.com>
Date: Wed, 10 Aug 2005 13:07:17 +0100
Message-ID: <42F9EDF5.9030008@hp.com>
To: Steve Harris <S.W.Harris@ecs.soton.ac.uk>
CC: DAWG public list <public-rdf-dawg@w3.org>



Steve Harris wrote:
> http://www.ecs.soton.ac.uk/~swh/protocol-tests/data/construct/
> 
> A step towards completing 'ACTION SteveH: elaborate "CONSTRUCT with content
> negotiation" into a test case'
> 
> I've not run it, and in particular the data is just back-extrapolated from
> the query and results, so it might not be as intended.
> 
> There is no schema for the manifest yet, I'l write one if its deemed
> acceptable.
> 
> PS Kendall, in this example in the protocol doc. revision 1.57 theres not
>    enough escaping in the query.
> 
> - Steve
> 

A test is modelled as name/action/result where action is often a pair of query 
and data file.  This split could be used here:

	rdfs:label "CONSTRUCT with content negotiation" ;
	mf:action [
		ptest:data <conneg-data.rq> ;
                 ptest:query <conneg-query.rq> ;
	     	ptest:acceptType "text/rdf+n3, application/rdf+xml" ;
     		ptest:defaultGraph <http://my.example/jose/foaf.rdf> ;
                   ] ;

         mf:result [
		ptest:preferredResult [ ... ] ; 							ptest:compliantResult [ ....] ;
		ptest:compliantResult [ ....] ;
                   ] ;

I find having a node for the action is helpful in processing but it is as much a 
style thing as anything else.  I'd like to reuse as much of my current testing 
environment for protocol tests (that is, I'd like to use the same top level and 
swicth on test type and result type.

----------------------------

Would this be a good time to add other kinds of test as well?

I have extended the test manifest format in two ways:

==== Test types:

An rdf:type on the test item
   Types I use are:
     :QueryTest (the default - as per the current WG tests)
	Must have data.
     :TestSyntax (positive syntax test)
        action may be just a string, not a bNode.  Can also be a bNode
     :TestBadSyntax (negative syntax test)
        action may be just a string, not a bNode.
     :TestSerialization (test result set output formats - not relevant)

default test type per manifest file
  (and the default value is a query test

eg.

<>  rdf:type mf:Manifest ;
     rdfs:label "LABEL" ;
     mfx:defaultTestType   mfx:TestQuery ;
     mf:entries
     (
       [  mf:name "Test-1" ;
          rdf:type  mfx:TestBadSyntax ;
          mf:action <Q.rq> ;
       ]
     ).

mfx is my extension namespace

==== Includes

Manifests can be included by another manifest.  This creates a hierarchy of 
tests (manifest have names).  This includes is a list so things happen in teh 
same order each test run.

In JUnit terms:
1/ One manifest = one test suite
2/ "Includes" means include a test suite as a test in another test suite

This is my main testing file.

<>  rdf:type mf:Manifest ;
     rdfs:label "ARQ - Scripts" ;
     mfx:include (
          ## Syntax tests includes separately elsewhere
          ## Include when typed tests are in the DAWG test suite
          ## At the moment they have an empty graph and no results
          ## to make them work.
##         <Syntax-ARQ/manifest.ttl>
##         <Syntax-SPARQL/manifest.ttl>
##         <Syntax-SPARQL2/manifest.ttl>

         <Basic/manifest.ttl>

         <Graph/manifest.n3>
         <Optional/manifest.ttl>
         <Union/manifest.n3>
         <Unsaid/manifest.ttl>

         <Select/manifest.ttl>
         <Construct/manifest.ttl>
         <Describe/manifest.ttl>
         <Ask/manifest.ttl>

         <Dataset/manifest.n3>

         <Bound/manifest.n3>
         <Expr/manifest.ttl>

         <Expr1/manifest.n3>
         <Expr2/manifest.n3>
         <ExprEquals/manifest.n3>
         <ExprBuiltIns/manifest.ttl>
         <ExprRegex/manifest.ttl>
         <Function/manifest.ttl>

         <OrderBy/manifest.ttl>
         <SolutionSeq/manifest.ttl>

         <Planning/manifest.ttl>
     ) .

	Andy
Received on Wednesday, 10 August 2005 12:08:07 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 16:15:24 GMT