commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jacob Beard <>
Subject [scxml-js] Question on unit testing external communications module
Date Sun, 01 Aug 2010 19:37:16 GMT

I'm currently trying to determine the best way to test the external 
communications module in scxml-js. Right now, dependency injection is 
used to pass in an object, which is responsible for external 
communications, to the Statechart constructor function. This allows one 
to use a mock object in the unit tests to ensure that the external 
communications object is being called at the expected time, with the 
expected arguments.

However, due to the complexity of the SCXML external communications 
module, I think it would also be useful to also write some tests to 
ensure that scxml-js statechart instances are able to communicate 
correctly via HTTP with Apache Commons SCXML statechart instances, 
according to the HTTP I/O Processor specification.

I'd like to know what kind of automated testing Apache Commons SCXML 
uses to test the external communications module; in particular, are only 
mock objects used, or is an HTTP server used for testing? I've used 
Tomcat with Ant for automated unit testing before, so I know what's 
involved in that, but I haven't worked much with Commons SCXML, so it 
would be good if there was test code that I could use a reference.

Let me know what you think. Thanks,


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message