You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by Jim Marino <jm...@myromatours.com> on 2006/11/26 06:46:39 UTC

Testcase refactoring (r479280)

FYI, today I went through and cleaned up some of the kernel test  
cases. Besides eliminating duplicate mock classes, I also substituted  
EasyMock objects for implementation classes where contracts (and not  
implementation classes) were being tested. For example, testing of a  
JavaTargetInvoker would use a MockObject for AtomicComponent and not  
JavaAtomicComponent for tests that verify the contract between the  
invoker and and a component. Of course, there are still tests that  
verify the interaction between implementations as well but using  
EasyMock allows us to avoid unnecessarily referencing implementations.

For scenarios where we want to test the actual interaction between a  
number of artifacts, I created a new package, integration, under  
core. This can be used for (lack of a better term) "micro- 
integration" tests. While the Maven iTest framework will verify  
larger swaths of the runtime, core/integration testcases can operate  
at a finer grained level (e.g. 5-6 classes). For example, they could  
verify certain invocation flows for conversations or callbacks. I  
would distinguish these from the iTest framework in that they are a  
bit finer grained, often perform negative testing, and only  
initialize a small piece of the runtime. Also, they are tests that  
one would want run during checkin.

Jim 

---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org