Hi
Yesterday I was trying to write a test-case for parallel scxml, it is quite a
task to write it.
Now I am not sure if this the right place to think out loud. But since I
couldn't find a better place. This is what I am thinking.
Have an XML describe the transitions which the FSM will go through. Also allow
this xml to fire events and inspect the variables. a <stable/> tag can be used
to make sure that the fsm is stable and waiting for some event.
Any comments!!! This is just thinking out loud. Might have a whole bunch of
loop-holes (Or might be an outright bad idea!!)!!!
+Fasih
XML
***
<testsuite scxml="parallel-world.scxml">
<testcase id="checkInitial" initial="true">
<assert>
<transition id="/my-parallel-world"/>
<transition id="/my-parallel-world/two-hellos"/>
<parallel>
<transition
id="/my-parallel-world/two-hellos/call-1"/>
<transition
id="/my-parallel-world/two-hellos/call-2"/>
</parallel>
</assert>
</testcase>
<testcase id="testProvider">
<begin>
<state id="/my-parallel-world/two-hellos/call-1"/>
</begin>
<assert>
<transition
id="/my-parallel-world/two-hellos/call-1/call1.wait-for-someone"/>
<stable/>
<isTrue expr="sipProvider.isReady"/>
</assert>
<fire event="hello.is-anyone-there"/>
<assert>
<transition
id="/my-parallel-world/two-hellos/call-1/call1.say-hello"/>
<transition
id="/my-parallel-world/two-hellos/call-1/call1.i-am-done"/>
<stable/> <!-- Meaning, it is not going to move out
till an event is fired -->
</assert>
</testcase>
</testsuite>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]