Unit Test Specification

Specification

    Namespace:

      http://www.mygrid.org.uk/mygrid-moby-service#

    Class:

      #unitTest

    usage:

      can have one or more unitTests per service #operation

    ObjectProperty:

      #hasUnitTest

    • domain: #operation
    • range : #unitTest

    DatatypeProperty:

      #exampleInput

    • domain: #unitTest
    • range: xsd#string
    • content: the full BioMOBY payload XML of an invocation message

    DatatypeProperty:

      #validOutputXML

    • domain: #unitTest
    • range: xsd#string
    • content: the full BioMOBY payload of the associated output message

    DatatypeProperty:

      #validREGEX

    • domain: #unitTest
    • range: xsd#string
    • content: a regular expression that should match against the output BioMOBY Payload of this unitTest

    DatatypeProperty:

      #validXPath

    • domain: #unitTest
    • range: xsd#string
    • content: an XPath expression that should match against the output BioMOBY Payload of this unitTest

Example

Excerpt from an actual RDF document that describes a BioMOBY service:

...

<mygrid:operation>
 <mygrid:hasUnitTest>
  <mygrid:unitTest>
   <!--
       here is an example input to
       invoke the service with
    -->
   <mygrid:exampleInput><![CDATA[
   <moby:MOBY xmlns:moby='http://www.biomoby.org/moby'>
    <moby:mobyContent>
     <moby:mobyData queryID='1'>
       <moby:Simple articleName='allele'>
         <Object namespace="DragonDB_Allele" id="cho"/>
       </moby:Simple>
     </moby:mobyData>
    </moby:mobyContent>
   </moby:MOBY>
   ]]></mygrid:exampleInput>

   <!-- this xpath statement returns
        obtains hits when applied to
        the service output given the
        above service input
   -->
   <mygrid:validXPath>
    <![CDATA[
     /moby:MOBY/moby:mobyContent/moby:mobyData/moby:Simple/moby:Object
    ]]>
   </mygrid:validXPath>
  </mygrid:unitTest>
 </mygrid:hasUnitTest>

...

Full RDF can be found here.