FTR, in most of the tests for servicemix components, we start the
container in embedded mode, which mean no jmx, no jndi, no jms / jca
flow, no activemq broker, no hot deployer, etc...  Basically just a
bunch of pojos wired together, so I really doubt the performance is an
issue here.
Most of the time spend in tests is when testing http or jms or any
other stuff that need additional resources (web server, broker,
etc...), but i don't see well how to get rid of these.
Another point, we have nearly no real unit tests for components.
IIRC, all the tests for servicemix-http or servicemix-jms (for
example) are integration tests and set up the web server or JMS
broker.

On Thu, Jun 5, 2008 at 9:53 AM, Gert Vanthienen
<[EMAIL PROTECTED]> wrote:
> L.S.,
>
> I agree it would be good thing to make a distinction between unit tests and
> integration tests.  We should probably have both of them: unit tests could
> use the mock test framework and for the integration tests, we should keep on
> using the containers.
>
> For the integration tests, wouldn't it be possible to write most of them in
> a form that allows to test them on both versions of the container
> automatically.  Another idea (probably slightly out-of-scope for now)= we
> could look into is doing multiple integration tests with a single container
> instance.  The Maven itests should allow us to:
> - start a container in pre-integration-test
> - deploy/test/undeploy for a set of integration tests
> - stop the container in post-integration-test
>
> This should reduce the overhead of starting/stopping the container over and
> over again, making the tests easier/faster to run -- I know the container is
> lightweight thing, but it should still make a difference, no?
>
> Regards,
>
> Gert
>
> Chris Custine wrote:
>>>
>>> I don't really see why we should not continue using the containers for
>>> unit testing.  It would be a major work to remove the references to
>>> the container, or even to rewrite all the tests using mocks instead of
>>> the containers.  Furthermore, booting smx3 is very fast and
>>> lightweight.
>>>
>>
>>
>> I agree with Guillaume here.  I definitely want to continue integration
>> tests inside the container.  I was mainly talking about adding a way to
>> test
>> against specific versions of the container or maybe even multiple version
>> in
>> the same build?  Currently the components inherit the version of the
>> container from the parent pom, and we will have to make this a
>> configurable
>> property for selecting the container version when running tests.
>>
>> If anything, a mock strategy could be in addition to the itests, but not
>> sure if I would drop integration tests.
>>
>>
>>
>>>>
>>>> Bruce
>>>> --
>>>>
>



-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/

Reply via email to