W3C home > Mailing lists > Public > public-soap-jms@w3.org > November 2008

Creating testcase definitions

From: Phil Adams <phil_adams@us.ibm.com>
Date: Tue, 11 Nov 2008 14:00:08 -0600
To: public-soap-jms@w3.org
Message-ID: <OFFF3D4A80.60345381-ON862574FE.006D79EE-862574FE.006DE094@us.ibm.com>
Hi everyone,
As promised on the call this morning, here is a set of instructions for 
defining a new testcase.

1) Familiarize yourself with the existing testcase documentation, 
available here: 
   Note that from most of the individual pages that make up the testcase 
documentation, there is a link to the source xml file for that page.

2) Define a new "testcase" element (to be added to testcases.xml) that 
looks like this:

  <testcase xml:id="test0002"
    <title>SOAP 1.1 two-way request</title>
    <description><![CDATA[SOAP 1.1 two-way request message sent to a 
request queue, and response message returned to response queue.]]>
        <assertion id="Protocol-2002"/>
        <assertion id="Protocol-2004"/>
        <assertion id="Protocol-2009"/>
        <assertion id="Protocol-2010"/>
        <assertion id="Protocol-2016"/>
        <assertion id="Protocol-2018"/>
        <assertion id="Protocol-2021"/>
        <assertion id="Protocol-2022"/>
        <assertion id="Protocol-2027"/>
        <assertion id="Protocol-2029"/>
        <assertion id="Protocol-2034"/>
        <assertion id="Protocol-2036"/>
        <assertion id="Protocol-2037"/>
        <assertion id="Protocol-2038"/>
        <assertion id="Protocol-2040"/>
        <assertion id="Protocol-2050"/>
    <message-exchange type="SOAP11-JMS-In-Out">
        <message from="A" to="B" 
document="messages/soap11/message0002request.xml" name="message"
            <assert test="jmsmsg:MessageType = bytes"/> 
            <assert test="jmsmsg:MessageID = ${request_message_id}"/> 
            <assert test="jmsmsg:JMSDeliveryMode = 2"/> 
            <assert test="jmsmsg:JMSPriority = 4"/> 
            <assert test="jmsmsg:JMSExpiration = 0"/> 
            <assert test="jmsmsg:JMSReplyTo = ${jms_response_dest}"/> 
            <assert test="jmsmsg:JMSCorrelationID = null"/> 
            <assert test="jmsmsg:JMSDestination = ${jms_request_dest}"/> 
            <assert test="jmsmsg:JMSRedelivered = false"/> 
            <assert test="jmsmsg:SOAPJMS_bindingVersion = '1.0'"/> 
            <assert test="jmsmsg:SOAPJMS_targetService = 'EchoPort'"/> 
            <assert test="jmsmsg:SOAPJMS_contentType = 'text/xml'"/> 
            <assert test="jmsmsg:SOAPJMS_soapAction = ''"/> 
            <assert test="jmsmsg:SOAPJMS_requestIRI = 
            <assert test="jmsmsg:JMSMessageBody = ${soap_request_msg}"/> 
        <message from="B" to="A" 
document="messages/soap11/message0002response.xml" name="message">
            <assert test="jmsmsg:MessageType = bytes"/> 
            <assert test="jmsmsg:MessageID = ${response_message_id}"/> 
            <assert test="jmsmsg:JMSDeliveryMode = 2"/> 
            <assert test="jmsmsg:JMSPriority = 4"/> 
            <assert test="jmsmsg:JMSExpiration = 0"/> 
            <assert test="jmsmsg:JMSReplyTo = null"/> 
            <assert test="jmsmsg:JMSCorrelationID = 
            <assert test="jmsmsg:JMSDestination = ${jms_response_dest}"/> 
            <assert test="jmsmsg:JMSRedelivered = false"/> 
            <assert test="jmsmsg:SOAPJMS_bindingVersion = '1.0'"/> 
            <assert test="jmsmsg:SOAPJMS_contentType = 'text/xml'"/> 
            <assert test="jmsmsg:JMSMessageBody = ${soap_response_msg}"/> 

  a) Assign a unique "id" attribute (e.g. "test0003")
  b) Enter a short testcase name for the "title" element and a slightly 
longer description in the "description" element.
     Basically, the title and description should convey what is (perhaps) 
unique about the testcase or how it is
     distinguished from the other testcases.
  c) In the "assertions" element, add an "assertion" element for each 
assertion (from the binding spec) which this
     testcase tests for.
  d) In the "message-exchange" element's "type" attribute, enter the MEP 
associated with this testcase. 
     The valid MEPs are defined here: 
  e) There will be 1 "message" element for a one-way testcase, and 2 
elements for a two-way testcase.
  f) In each "message" element, set the "from" and "to" attributes 
appropriately, and set the "document" attribute 
     to refer to the xml file where the SOAP message is defined (this will 
be within the "messages/soap11" or
     "messages/soap12" directory.
  g) If the "message" element represents a request message, then set the 
"endpointURI" attribute to be the 
     endpoint location URI for that testcase.
  h) For each "message" element, add a collection of "assert" elements (as 
in the example above) 
     which describe the properties which must be set on that particular 
     You can use variables as necessary when defining the assert elements.
     The variables are defined here: 

3) Create a message defintion file (referenced from the "message" 
element's "document" element) which
   contains the SOAP message for that testcase.  Here's an example:

      <?xml version="1.0" encoding="UTF-8"?>
      <soapenv:Envelope xmlns:soapenv="
        <ns:echoStringInput xmlns:ns="http://soapjms.sample">
          <echoInput>Hello world!</echoInput>

4) Email your testcase definitions to phil_adams@us.ibm.com and I'll 
incorporate them into the CVS repository.

Let me know if you have any questions.


Phil Adams 
WebSphere Development - Web Services
IBM Austin, TX
email: phil_adams@us.ibm.com
office: (512) 838-6702  (tie-line 678-6702)
mobile: (512) 750-6599
Received on Tuesday, 11 November 2008 20:01:35 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 18 December 2010 18:16:19 GMT