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: [ebxml-iic] Concurrent threads and exceptions in test cases


Title: RE: OAGi meeting
Here are a few good links related to modeling and verification of concurrent software systems.
 
Link to a model checking tool: "Spin is a popular software tool that can be used for the formal verification of distributed software systems."
http://spinroot.com/spin/sitemap.html
 
White paper: "Using Model Checking to Generate Tests from Specifications"
http://hissa.nist.gov/~black/Papers/icfem98.pdf
-----Original Message-----
From: Michael Kass [mailto:michael.kass@nist.gov]
Sent: Thursday, January 08, 2004 8:43 PM
To: Jacques Durand; Tim Sakach; serm@nist.gov
Cc: Monica.Martin@sun.com; Jacques Durand
Subject: Re: Concurrent threads and exceptions in test cases

Jacques,
 
 
 I am attaching a diagram and modifed Test Framework schema to support forks, joins, synchronous  and asynchronous actions.
I also attached the actual schema... plus an XML instance file of the scripting applied to your test scenario below.  I also "inlined"
the instance file into this message.
 
 Rather than using <fork>, <join>, and <goto>, I suggest  <if>  and <then> ( plus I add <else> and <elseif> ) 
Concurrency for a <TestStep> is defined through the <if> element, and each individual <TestStep> can have an
"asynchronous" attribute value of "true" or "false".   Joins can "and" or "or", as defined by the <if> element's
"connectivePredicate" attribute falue of "and" or "or".
 
Please see the attached schema diagram illustrating my suggested syntax.. plus the attached XML file that validates
to the schema, representing the use case you defined below:
 

Test Thread "main":

(step1)- send (M1)

(step2)- async (exceptionE)

(step3)-  expect (M2)

(step4)-  verify (M2)(decide to fail / succeed the test case)

 

Test Thread "exceptionE":

(step1)- expect (ErrorM)

(step2)- verify (ErrorM) (decide to fail or not the test case)
 
 
Below is the <TestCase> representing the above scenario:  The Test Driver would recognize <TestStep> #2 as asynchronous, and would treat the
<TestStep> as a parallel operation and proceed  to <TestStep> #3.  <TestCase> success would be the determination that all 3 <TestStep>s evaluate to
"true" (pass), with <TestStep> #2 evaluated whenever it completes its asynchronous operation ( or times out ).
 
This <TestCase> does not illustrate the flexibility of the schema for doing "forks" and "joins".  It would be interesting to see if we can model
some BPSS <TestCase>s using this schema.
 
Comments?
 
 

<?xml version="1.0" encoding="UTF-8"?>

<ebTest:TestSuite xmlns:ebTest="http://www.oasis-open.org/tc/ebxml-iic/tests" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ebTest:configurationGroupRef="base">

       <ebTest:MetaData>

             <ebTest:Description>POC for BPSS testing</ebTest:Description>

             <ebTest:Version>0.1</ebTest:Version>

             <ebTest:Maintainer>Michael Kass</ebTest:Maintainer>

             <ebTest:Location>ScriptingTestSuite.xml</ebTest:Location>

             <ebTest:PublishDate>01/08/2004</ebTest:PublishDate>

             <ebTest:Status>DRAFT</ebTest:Status>

       </ebTest:MetaData>

       <ebTest:TestCase ebTest:id="testcase_1" ebTest:description="POC of asynchronous fork" ebTest:requirementReferenceId="req_1">

             <ebTest:TestStep ebTest:description="Send a message" ebTest:asynchronous="false" ebTest:id="step_01">

                    <ebTest:PutMessage ebTest:description="Send a message">

                           <ebTest:MessageDeclaration/>

                    </ebTest:PutMessage>

             </ebTest:TestStep>

             <ebTest:TestStep ebTest:description="Check for possible Error Message" ebTest:id="step_02" ebTest:asynchronous="true">

                    <ebTest:GetMessage ebTest:description="Retrieve Error message">

                           <ebTest:Filter>/MessageStore//Message//(MessageHeader(eb:ConversationId=$ConversationId)) and not(eb:ErrorList))</ebTest:Filter>

                           <ebTest:TestAssertion ebTest:description="Verify Error is NOT present">

                                 <ebTest:VerifyContent>//Error</ebTest:VerifyContent>

                           </ebTest:TestAssertion>

                    </ebTest:GetMessage>

             </ebTest:TestStep>

             <ebTest:TestStep ebTest:description="Verify Response Message" ebTest:id="step_03" ebTest:asynchronous="false">

                    <ebTest:GetMessage ebTest:description="Retrieve Response message">

                           <ebTest:Filter>/MessageStore/Message//(MessageHeader(eb:ConversationId=$ConversationId and eb:Action="Mute"))</ebTest:Filter>

                           <ebTest:TestAssertion ebTest:description="Verify Response is present">

                                 <ebTest:VerifyContent>//Error</ebTest:VerifyContent>

                           </ebTest:TestAssertion>

                    </ebTest:GetMessage>

             </ebTest:TestStep>

       </ebTest:TestCase>

</ebTest:TestSuite>

 

 

 

 
Mike
----- Original Message -----
Sent: Monday, January 05, 2004 10:52 PM
Subject: Concurrent threads and exceptions in test cases

Mike, Tim, Serm:
 
would like to share with you some way we could support concurrency as well as exceptions
in test cases, without introducing a flurry of workflow-like operators (split / join, exceptions, etc.)
 
 
Jacques
------------------------------------
 
 


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