I'm starting a small project which uses dependent services, etc. and
I'm trying to figure out a good way to unit test the application in
different aspects, such as basic method testing, integration tests and user tests.
I suggest you use AbstractMerlinTestCase for integration tests and user tests, and do basic unit testing (I suspect that's what you refer to by method testing) using a mock object approach. It helps decouple your components from the container even further.
Is there anyone who has tried to use the interface test case framework in http://groboutils.sourceforge.net together with AbstractMerlinTestCases? If so, how did you manage to delay the instantiation of Interface until merlin have initialized the implementations to test?
I think it's not really feasible to combine the two out of the box. Both are "invasive" in that they're abstract bases, which is always difficult to combine.
How do you specify that some unit tests should use stubs, while other tests should use the actual service which the other is dependent on? Is it possible to specify it in different block.xml files, or is it done programmatically?
You'll need to write the stubs manually (or use a generation tool) and wire them into your applications as if they were normal components, which indeed will likely involve creating a different block.xml file.
I have read in previous posts that the turbine-fulcrum component is using maven, and also have unit tests which implements AbstractMerlinTestCases. I'm about to look into the framework, but I'm thankful for all examples of merlin unit tests :).
I don't think we have any "big" examples atm; only what's on
http://avalon.apache.org/merlin/starting/advanced/unit/index.html
Fulcrum is probably a reasonably good place to look :D
-- cheers,
- Leo Simons
----------------------------------------------------------------------- Weblog -- http://leosimons.com/ IoC Component Glue -- http://jicarilla.org/ Articles & Opinions -- http://articles.leosimons.com/ ----------------------------------------------------------------------- "We started off trying to set up a small anarchist community, but people wouldn't obey the rules." -- Alan Bennett
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]