You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avalon.apache.org by Stephen McConnell <mc...@apache.org> on 2004/01/15 14:26:10 UTC
[merlin] test-suite?
Have been thinking about the merlin abstract unit test and possible
improvements that could be made. Currently we have specialization of
UnitTest that contains an embedded Merlin Kernel that is configured
relative to a merlin.properties file together with some implicit
deployment path logic defined within the test case itself.
An alternative approach is to define a test-suite that uses merlin to
create, deploy and test components. This would enable:
* unit test treated like any other avalon component
- declares dependencies
- can provide services to other tests
- can have packaged config, etc.
* test suite can integrate the following:
- classic components defined under the main src tree
- test components defined under the src/test tree
The testsuite itself could be launched using a maven goal possibly as a
postgoal to the classic test:test goal. Aside from the benefits listed
above, this would eliminate the need for dependency references to the
merlin unit test package (which I find are constantly getting out of date).
Any thoughts on this?
Stephen.
--
|------------------------------------------------|
| Magic by Merlin |
| Production by Avalon |
| |
| http://avalon.apache.org/merlin |
| http://dpml.net/merlin/distributions/latest |
|------------------------------------------------|
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org
Re: [merlin] test-suite?
Posted by Leo Simons <le...@apache.org>.
Stephen McConnell wrote:
> Any thoughts on this?
Take a look at the whole "mock objects" concept.
If this is really about *unit* testing of your components, you IMNHSO
don't want to use a full-fledged merlin installation, you want a "mock"
container that doesn't give you headaches about classloaders, repository
management, property files, etc etc.
If it is about *integration* testing (ie "do my unit tested components
actually fit together, and inside the server?"), a better idea, again
IMHO, is to actually run the server (in standalone mode) and connect a
debugger (or in the case of a server, connect a test client).
--
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: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org
Re: [merlin] test-suite?
Posted by David Worms <da...@simpledesign.com>.
> An alternative approach is to define a test-suite that uses merlin to
> create, deploy and test components. This would enable:
This is somewhat similar to what I did to do in earlier version of
Merlin (3.0.x I think), using merlin:simulate. My main issue at the
time what that I couldn't configure merlin to look both in the src/java
and src/test folder when resolving component (and relative meta info).
This means I had to put my testing component in the src/java and they
would be packaged with my jar file. Also, I needed two conf/block.xml:
one for the generated jar, and an other one for the test ( which will
reference the same components as the first block.xml + the testing
components. Otherwise, it works pretty well.
d.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org