OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

ebxml-iic message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: Concurrent thread use cases using <If><Then><Else> syntax


Title: call this Monday
Jacques and all,
 
 
  Here is my response to the ongoing thread regarding test case scripting.
It looks like we have nearly reached convergence.   I am attaching a revised schema
diagram reflecting changes, along with a ZIP containing the 3 use case instances,
along with schemas an XSL stylesheet.
  With the revised schema, ( including both <If><Then><Else> along with <Split> and <Join> elements ),
I am also including revised use case instance files reflecting those changes. 
 
  Some suggestions based upon these use cases:
 
1) If we define a "pass" <Thread>  and a "fail" <Thread>.. we may want to make the "global" ( i.e. defined
at the <TestSuite> level ) since they can then be used everywhere.  If we assume that the scope of a
<Thread> definition is only local to a <TestCase>... it just seems like a logical thing to do I think.
 
2) I agree that there is no need to have a <Thread> evaluate to "true"... if we can instead just verify that
the last <TestAssertion> in the <Thread> evaluates to "true".. however.. there may be <TestStep>s  in a <Thread> where
there is only a <TestPreCondition>   or where there is only a <PutMessage> operation.  If a <PutMessage>
happens to be final "leaf node" in our <Thread> branch.. then there is no <TestAssertion> ( a <TestStep> with
a <PutMessage> simply  sends a message, and returns a "true" if it is successful. )  So I would suggest that
we simply state that as long as the final leaf node in a <Thread> branch, or a <TestStep> branch returns a
value of "true", then the logic flow may proceed after that branch. I am avoiding saying that the <Thread>  or <TestStep>
therefore evaluates to "true".. but in essence, that is what I am saying.
 
3) After revising the 3 use case instances, I agree with your earlier suggestion that a <Thread> be "synchronous" by default,
and that a <Split> be used to define it as "asynchronous".  It makes for much cleaner structure.. plus it enforces the
"synchronization" of <Thread>s through the <Join> operator.   I think that ( although a bit more verbose ).. it removes
ambiguities  and ultimately makes it more understandable. 
 
Regards,
Mike
 
 

scripting_schema.jpg

ÿþ<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><head xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:ebTest="http://www.oasis-open.org/tc/ebxml-iic/tests"> <META http-equiv="Content-Type" content="text/html; charset=UTF-16"> <title>ebXML Test Suite Author: Michael Kass Organization: NIST Date: 05/15/2003 Version 1.0 </title><link rel="stylesheet" type="text/css" href="xmlverbatim.css"></head><center xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:ebTest="http://www.oasis-open.org/tc/ebxml-iic/tests"><h2>POC for BPSS testing: Case 1</h2></center><table border="2" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:ebTest="http://www.oasis-open.org/tc/ebxml-iic/tests"><tr><td width="10%" align="center"><h4>Test Object</h4></td><td width="10%" align="center"><h4>ID</h4></td><td width="10%" align="center"><h4>Description</h4></td><td width="10%" align="center"><h4>Mode</h4></td><td width="10%" align="center"><h4>Operation</h4></td><td width="10%" align="center"><h4>Configuration</h4></td><td width="40%" align="center"><h4>Message Expression</h4></td></tr><tr><td width="10%" align="left">Test Suite</td><td width="10%" align="center"></td><td width="10%" align="center"></td><td width="10%" align="center"></td><td width="10%" align="center"></td><td width="10%" align="left"></td><td width="40%" align="center"></td></tr><tr><td><b> Test Case </b></td><td><i><b>testcase_1</b></i></td><td><i><b>POC of exception handling</b></i></td><td></td><td></td><td></td><td></td></tr><tr><td>TestStep</td><td>step_01_01</td><td></td><td></td><td></td><td></td></tr><tr bgcolor="FFFFFF"><td></td><td></td><td>Send a message m1</td><td></td><td>PutMessage</td><td></td><td width="50%"></td></tr><tr bgcolor="00FFFF"><td>If</td><td></td><td>ifType='and'</td><td></td><td></td><td></td><td></td></tr><tr bgcolor="FFAA00"><td>ThreadRef</td><td>nameRef='thread_02'</td><td>synchType='asynchronous' </td><td></td><td></td><td></td><td></td></tr><tr bgcolor="FF0000"><td>Thread</td><td>name='thread_02'</td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>TestStep</td><td>step_03</td><td>Test that an Error message was NOT received, any time within 300 seconds after step_01</td><td> stepDuration='300' </td><td></td><td></td></tr><tr bgcolor="FFFFFF"><td></td><td></td><td>Filter any ErrorList elements in the MessageStore</td><td></td><td>GetMessage</td><td></td><td width="50%">/MessageStore//Message//[eb:ErrorList]</td></tr><tr bgcolor="FFFFFF"><td>Assertion matchResult='fail' </td><td></td><td>Verify Error is present</td><td></td><td>VerifyContent</td><td></td><td width="50%">//Message[count()&gt;0]</td></tr><tr bgcolor="FF0000"><td>End Thread</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr bgcolor="FFAA00"><td>End ThreadRef</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr bgcolor="00FFFF"><td>Then</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr bgcolor="FFAA00"><td>ThreadRef</td><td>nameRef='exception'</td><td></td><td></td><td></td><td></td><td></td></tr><tr bgcolor="FF0000"><td>Thread</td><td>name='exception'</td><td></td><td></td><td></td><td></td><td></td></tr><tr><td><b><font color="FF0000">fail</font></b></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr bgcolor="FF0000"><td>End Thread</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr bgcolor="FFAA00"><td>End ThreadRef</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr bgcolor="00FFFF"><td>End Then</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr bgcolor="00FFFF"><td>End If</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>TestStep</td><td>step_01_03</td><td></td><td></td><td></td><td></td></tr><tr bgcolor="FFFFFF"><td></td><td></td><td>Retrieve Response message M2</td><td></td><td>GetMessage</td><td></td><td width="50%">/MessageStore/Message//[eb:MessageHeader[eb:ConversationId=$ConversationId and eb:Action="Mute" and eb:MessageData/eb:MessageId='m2']</td></tr><tr bgcolor="FFFFFF"><td>Assertion </td><td></td><td>Verify Response is present</td><td></td><td>VerifyContent</td><td></td><td width="50%">//Message(count()=1)&gt;</td></tr></table>ÿþ<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><head xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:ebTest="http://www.oasis-open.org/tc/ebxml-iic/tests"> <META http-equiv="Content-Type" content="text/html; charset=UTF-16"> <title>ebXML Test Suite Author: Michael Kass Organization: NIST Date: 05/15/2003 Version 1.0 </title><link rel="stylesheet" type="text/css" href="xmlverbatim.css"></head><center xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:ebTest="http://www.oasis-open.org/tc/ebxml-iic/tests"><h2>POC for BPSS testing: Case 2</h2></center><table border="2" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:ebTest="http://www.oasis-open.org/tc/ebxml-iic/tests"><tr><td width="10%" align="center"><h4>Test Object</h4></td><td width="10%" align="center"><h4>ID</h4></td><td width="10%" align="center"><h4>Description</h4></td><td width="10%" align="center"><h4>Mode</h4></td><td width="10%" align="center"><h4>Operation</h4></td><td width="10%" align="center"><h4>Configuration</h4></td><td width="40%" align="center"><h4>Message Expression</h4></td></tr><tr><td width="10%" align="left">Test Suite</td><td width="10%" align="center"></td><td width="10%" align="center"></td><td width="10%" align="center"></td><td width="10%" align="center"></td><td width="10%" align="left"></td><td width="40%" align="center"></td></tr><tr><td><b> Test Case </b></td><td><i><b>testcase_2</b></i></td><td><i><b>Workflow If</b></i></td><td></td><td></td><td></td><td></td></tr><tr><td>TestStep</td><td>step_01</td><td></td><td></td><td></td><td></td></tr><tr bgcolor="FFFFFF"><td></td><td></td><td>Send a message m1</td><td></td><td>PutMessage</td><td></td><td width="50%"></td></tr><tr bgcolor="FF0000"><td>Thread</td><td>name='If_example'</td><td>synchType='synchronous' </td><td></td><td></td><td></td><td></td></tr><tr bgcolor="00FFFF"><td>If</td><td></td><td>ifType='and'</td><td></td><td></td><td></td><td></td></tr><tr bgcolor="FFAA00"><td>ThreadRef</td><td>nameRef='thread_01'</td><td>synchType='asynchronous' </td><td></td><td></td><td></td><td></td></tr><tr bgcolor="FF0000"><td>Thread</td><td>name='thread_01'</td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>TestStep</td><td>step_01_01</td><td></td><td></td><td></td><td></td></tr><tr bgcolor="FFFFFF"><td></td><td></td><td>Retrieve Response message m2a</td><td></td><td>GetMessage</td><td></td><td width="50%">/MessageStore/Message//(eb:MessageHeader(eb:ConversationId=$ConversationId and eb:Action="Mute" and eb:MessageData/eb:MessageId="m2a"))</td></tr><tr bgcolor="FFFFFF"><td>Assertion </td><td></td><td>Verify Response is present</td><td></td><td>VerifyContent</td><td></td><td width="50%">//Message(count()=1)&gt;</td></tr><tr><td>TestStep</td><td>step_01_02</td><td>Verify Response Message m2b</td><td></td><td></td><td></td></tr><tr bgcolor="FFFFFF"><td></td><td></td><td>Retrieve Response message</td><td></td><td>GetMessage</td><td></td><td width="50%">/MessageStore/Message//(eb:MessageHeader(eb:ConversationId=$ConversationId and eb:Action="Mute" and eb:MessageData/eb:MessageId="m2b"))</td></tr><tr bgcolor="FFFFFF"><td>Assertion </td><td></td><td>Verify Response is present</td><td></td><td>VerifyContent</td><td></td><td width="50%">//Message(count()=1)&gt;</td></tr><tr bgcolor="FF0000"><td>End Thread</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr bgcolor="FFAA00"><td>End ThreadRef</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr bgcolor="FFAA00"><td>ThreadRef</td><td>nameRef='thread_02'</td><td>synchType='asynchronous' </td><td></td><td></td><td></td><td></td></tr><tr bgcolor="FF0000"><td>Thread</td><td>name='thread_02'</td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>TestStep</td><td>step_02_01</td><td></td><td></td><td></td><td></td></tr><tr bgcolor="FFFFFF"><td></td><td></td><td>Retrieve Response message m3</td><td></td><td>GetMessage</td><td></td><td width="50%">/MessageStore/Message//(eb:MessageHeader(eb:ConversationId=$ConversationId and eb:Action="Mute" and eb:MessageData/eb:MessageId="m3"))</td></tr><tr bgcolor="FFFFFF"><td>Assertion </td><td></td><td>Verify Response is present</td><td></td><td>VerifyContent</td><td></td><td width="50%">//Message(count()=1)&gt;</td></tr><tr bgcolor="FF0000"><td>End Thread</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr bgcolor="FFAA00"><td>End ThreadRef</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr bgcolor="00FFFF"><td>Then</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr bgcolor="FFAA00"><td>ThreadRef</td><td>nameRef='thread_03'</td><td></td><td></td><td></td><td></td><td></td></tr><tr bgcolor="FF0000"><td>Thread</td><td>name='thread_03'</td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>TestStep</td><td>step_02_02</td><td></td><td></td><td></td><td></td></tr><tr bgcolor="FFFFFF"><td></td><td></td><td>Retrieve Response message m4</td><td></td><td>GetMessage</td><td></td><td width="50%">/MessageStore/Message//(eb:MessageHeader(eb:ConversationId=$ConversationId and eb:Action="Mute" and eb:MessageData/eb:MessageId="m4"))</td></tr><tr bgcolor="FFFFFF"><td>Assertion </td><td></td><td>Verify Response is present</td><td></td><td>VerifyContent</td><td></td><td width="50%">//Message(count()=1)&gt;</td></tr><tr bgcolor="FF0000"><td>End Thread</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr bgcolor="FFAA00"><td>End ThreadRef</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr bgcolor="00FFFF"><td>End Then</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr bgcolor="00FFFF"><td>End If</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr bgcolor="FF0000"><td>End Thread</td><td></td><td></td><td></td><td></td><td></td><td></td></tr></table>ÿþ<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><head xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:ebTest="http://www.oasis-open.org/tc/ebxml-iic/tests"> <META http-equiv="Content-Type" content="text/html; charset=UTF-16"> <title>ebXML Test Suite Author: Michael Kass Organization: NIST Date: 05/15/2003 Version 1.0 </title><link rel="stylesheet" type="text/css" href="xmlverbatim.css"></head><center xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:ebTest="http://www.oasis-open.org/tc/ebxml-iic/tests"><h2>POC for BPSS testing: Case 3</h2></center><table border="2" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:ebTest="http://www.oasis-open.org/tc/ebxml-iic/tests"><tr><td width="10%" align="center"><h4>Test Object</h4></td><td width="10%" align="center"><h4>ID</h4></td><td width="10%" align="center"><h4>Description</h4></td><td width="10%" align="center"><h4>Mode</h4></td><td width="10%" align="center"><h4>Operation</h4></td><td width="10%" align="center"><h4>Configuration</h4></td><td width="40%" align="center"><h4>Message Expression</h4></td></tr><tr><td width="10%" align="left">Test Suite</td><td width="10%" align="center"></td><td width="10%" align="center"></td><td width="10%" align="center"></td><td width="10%" align="center"></td><td width="10%" align="left"></td><td width="40%" align="center"></td></tr><tr><td><b> Test Case </b></td><td><i><b>testcase_3</b></i></td><td><i><b>Conditional Branching</b></i></td><td></td><td></td><td></td><td></td></tr><tr><td>TestStep</td><td>step_01</td><td>Send a message M1</td><td></td><td></td><td></td></tr><tr bgcolor="FFFFFF"><td></td><td></td><td>Send a message</td><td></td><td>PutMessage</td><td></td><td width="50%"></td></tr><tr bgcolor="00FFFF"><td>If</td><td></td><td>ifType='or'</td><td></td><td></td><td></td><td></td></tr><tr bgcolor="FFAA00"><td>ThreadRef</td><td>nameRef='thread_01'</td><td></td><td></td><td></td><td></td><td></td></tr><tr bgcolor="FF0000"><td>Thread</td><td>name='thread_01'</td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>TestStep</td><td>step_01_01</td><td></td><td></td><td></td><td></td></tr><tr bgcolor="FFFFFF"><td></td><td></td><td>Retrieve Response message m2 and test if message is an 'Approval' </td><td></td><td>GetMessage</td><td></td><td width="50%">/MessageStore/Message//(eb:MessageHeader(eb:ConversationId=$ConversationId and eb:Action="Mute" and eb:MessageData/eb:MessageId="m2"))</td></tr><tr bgcolor="FFFFFF"><td>Precondition </td><td></td><td>Verify Response is present</td><td></td><td>VerifyContent</td><td></td><td width="50%">//Message(count()=1)&gt;</td></tr><tr bgcolor="FFFFFF"><td></td><td></td><td>Get message payload</td><td></td><td>GetPayload Content-Id = 'cid:response'<br></td><td></td><td width="50%"></td></tr><tr bgcolor="FFFFFF"><td>Precondition </td><td></td><td>Verify that message is a 'approval'</td><td></td><td>VerifyContent</td><td></td><td width="50%">//Approval</td></tr><tr><td>TestStep</td><td>step_01_02</td><td></td><td></td><td></td><td></td></tr><tr bgcolor="FFFFFF"><td></td><td></td><td>Send a message m4</td><td></td><td>PutMessage</td><td></td><td width="50%"></td></tr><tr><td>TestStep</td><td>step_01_03</td><td></td><td></td><td></td><td></td></tr><tr bgcolor="FFFFFF"><td></td><td></td><td>Retrieve message m5</td><td></td><td>GetMessage</td><td></td><td width="50%">/MessageStore/Message//(eb:MessageHeader(eb:ConversationId=$ConversationId and eb:Action="Rejection" and eb:MessageData/eb:MessageId="m5"))</td></tr><tr bgcolor="FFFFFF"><td>Assertion </td><td></td><td>Verify Response is present</td><td></td><td>VerifyContent</td><td></td><td width="50%">//Message(count()=1)&gt;</td></tr><tr bgcolor="FF0000"><td>End Thread</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr bgcolor="FFAA00"><td>End ThreadRef</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr bgcolor="FFAA00"><td>ThreadRef</td><td>nameRef='thread_01'</td><td></td><td></td><td></td><td></td><td></td></tr><tr bgcolor="FF0000"><td>Thread</td><td>name='thread_01'</td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>TestStep</td><td>step_01_01</td><td></td><td></td><td></td><td></td></tr><tr bgcolor="FFFFFF"><td></td><td></td><td>Retrieve Response message m2 and test if message is an 'Approval' </td><td></td><td>GetMessage</td><td></td><td width="50%">/MessageStore/Message//(eb:MessageHeader(eb:ConversationId=$ConversationId and eb:Action="Mute" and eb:MessageData/eb:MessageId="m2"))</td></tr><tr bgcolor="FFFFFF"><td>Precondition </td><td></td><td>Verify Response is present</td><td></td><td>VerifyContent</td><td></td><td width="50%">//Message(count()=1)&gt;</td></tr><tr bgcolor="FFFFFF"><td></td><td></td><td>Get message payload</td><td></td><td>GetPayload Content-Id = 'cid:response'<br></td><td></td><td width="50%"></td></tr><tr bgcolor="FFFFFF"><td>Precondition </td><td></td><td>Verify that message is a 'approval'</td><td></td><td>VerifyContent</td><td></td><td width="50%">//Approval</td></tr><tr><td>TestStep</td><td>step_01_02</td><td></td><td></td><td></td><td></td></tr><tr bgcolor="FFFFFF"><td></td><td></td><td>Send a message m4</td><td></td><td>PutMessage</td><td></td><td width="50%"></td></tr><tr><td>TestStep</td><td>step_01_03</td><td></td><td></td><td></td><td></td></tr><tr bgcolor="FFFFFF"><td></td><td></td><td>Retrieve message m5</td><td></td><td>GetMessage</td><td></td><td width="50%">/MessageStore/Message//(eb:MessageHeader(eb:ConversationId=$ConversationId and eb:Action="Rejection" and eb:MessageData/eb:MessageId="m5"))</td></tr><tr bgcolor="FFFFFF"><td>Assertion </td><td></td><td>Verify Response is present</td><td></td><td>VerifyContent</td><td></td><td width="50%">//Message(count()=1)&gt;</td></tr><tr bgcolor="FF0000"><td>End Thread</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr bgcolor="FFAA00"><td>End ThreadRef</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr bgcolor="00FFFF"><td>End If</td><td></td><td></td><td></td><td></td><td></td><td></td></tr></table>

scripting_poc_02_04_04.zip



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]