You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@servicemix.apache.org by Jean-Baptiste Onofre <jb...@nanthrax.net> on 2009/12/15 10:26:32 UTC

[DISCUSS] Components/bundles test on SMX4

Hi all,

Thanks to the Chris help, servicemix-exec component now provides unit 
tests on SMX4:
http://svn.apache.org/repos/asf/servicemix/components/engines/servicemix-exec/trunk/src/test/java/org/apache/servicemix/exec/tests/smx4/ExecTest.java

and thanks to the Charles help, I have understood why the NMR 
1.1.0-SNAPSHOT can't be deployed. The NMR features xml doesn't contains 
the repository tag with the karaf feature.
It's used in Camel: 
http://repository.apache.org/snapshots/org/apache/camel/karaf/features/2.1-SNAPSHOT/features-2.1-SNAPSHOT-features.xml

I will upgrade the NMR 1.1.0-SNAPSHOT feature XML to reference to the 
Karaf 1.2.0.

But I have a couple of questions:

1/ Theses tests are not really unit tests but more integration tests.
The marshaler tests are really unit tests as they are embedded in the 
component. But I think that testing the deployment of the component into 
SMX3 and SMX4 is more integration tests related. So, we should have a 
itests subproject in components where we test the deployment. What do 
you think ?
2/ the configuration() method is common to all components or bundles 
that want to test its deployment on SMX4. So it can be provided by an 
abstract class and extended by all components/bundles that require this 
kind of test. The question is: where can we put this Abstract class ?
I propose:
create a new project:
   components/itests
with two subprojects:
   smx3 to test deployment on SMX3
   smx4 to test deployment on SMX4
with one test class per component.
Camel use quite the same structure: 
https://svn.apache.org/repos/asf/camel/trunk/tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/
What do you think ?

Thanks
Regards
JB

Re: [DISCUSS] Components/bundles test on SMX4

Posted by Guillaume Nodet <gn...@gmail.com>.
Sounds good to me.

On Tue, Dec 15, 2009 at 13:11, Jean-Baptiste Onofre <jb...@nanthrax.net> wrote:
> Guillaume, totally agreed to create a "test" sub-project in
> servicemix-common. This test project will:
> - define the requirement for the integration tests (mainly defining the
> requirements in the pom)
> - provider abstract test classes for integration/deployment test in both
> SMX3 or SMX4.
> Like this, SMX components or bundles tests are more efficient and secure.
>
> Thoughts ?
>
> If all are OK, I will create it tonight.
>
> Regards
> JB
>
> Guillaume Nodet wrote:
>>
>> We could create a specific module, or maybe put it as part of
>> servicemix-shared SL build.
>> I think this would make sense maybe in servicemix-common to generate a
>> test jar that would include those classes.  Thoughts ?
>>
>> On Tue, Dec 15, 2009 at 12:59, Jean-Baptiste Onofre <jb...@nanthrax.net>
>> wrote:
>>>
>>> Hi Guillaume,
>>>
>>> thanks for this feedback.
>>>
>>> I'm ok to embed tests in component as we make currently. My question is
>>> where we can put some abstract test classes: in the NMR commons, in a new
>>> project in servicemix-common ?
>>> I think it's better to avoid to copy/paste configuration() method in each
>>> component.
>>>
>>> Regards
>>> JB
>>>
>>> Guillaume Nodet wrote:
>>>>
>>>> The problem I see with this way is that those tests won't be executed
>>>> when we release a given component.  This would only work if we release
>>>> all components together and have those tests inside the build I think.
>>>> I don't think having an integration test project per component is a
>>>> good idea too though ...
>>>>
>>>> On Tue, Dec 15, 2009 at 10:35, Charles Moulliard <cm...@gmail.com>
>>>> wrote:
>>>>>
>>>>> +1 to adopt the idea follow by Camel to tests each component (= bundle)
>>>>> (Atom, Amqp, Bindy, Ftp, HTTP, ...) separately and to use an
>>>>> AbstractFeatureClass where PAX EXAM is configured to load
>>>>> bundles/features
>>>>> required to run Camel or ServiceMix.
>>>>>
>>>>> As loading karaf or servicemix4 is CPU/time consuming, all the tests
>>>>> should
>>>>> be run once
>>>>>
>>>>> Regards,
>>>>>
>>>>> Charles Moulliard
>>>>> Senior Enterprise Architect
>>>>> Apache Camel Committer
>>>>>
>>>>> *****************************
>>>>> blog : http://cmoulliard.blogspot.com
>>>>> twitter : http://twitter.com/cmoulliard
>>>>> Linkedlin : http://www.linkedin.com/in/charlesmoulliard
>>>>>
>>>>> Apache Camel Group :
>>>>> http://www.linkedin.com/groups?home=&gid=2447439&trk=anet_ug_hm
>>>>>
>>>>>
>>>>> On Tue, Dec 15, 2009 at 10:26 AM, Jean-Baptiste Onofre
>>>>> <jb...@nanthrax.net>wrote:
>>>>>
>>>>>> Hi all,
>>>>>>
>>>>>> Thanks to the Chris help, servicemix-exec component now provides unit
>>>>>> tests
>>>>>> on SMX4:
>>>>>>
>>>>>>
>>>>>>
>>>>>> http://svn.apache.org/repos/asf/servicemix/components/engines/servicemix-exec/trunk/src/test/java/org/apache/servicemix/exec/tests/smx4/ExecTest.java
>>>>>>
>>>>>> and thanks to the Charles help, I have understood why the NMR
>>>>>> 1.1.0-SNAPSHOT can't be deployed. The NMR features xml doesn't
>>>>>> contains
>>>>>> the
>>>>>> repository tag with the karaf feature.
>>>>>> It's used in Camel:
>>>>>>
>>>>>>
>>>>>> http://repository.apache.org/snapshots/org/apache/camel/karaf/features/2.1-SNAPSHOT/features-2.1-SNAPSHOT-features.xml
>>>>>>
>>>>>> I will upgrade the NMR 1.1.0-SNAPSHOT feature XML to reference to the
>>>>>> Karaf
>>>>>> 1.2.0.
>>>>>>
>>>>>> But I have a couple of questions:
>>>>>>
>>>>>> 1/ Theses tests are not really unit tests but more integration tests.
>>>>>> The marshaler tests are really unit tests as they are embedded in the
>>>>>> component. But I think that testing the deployment of the component
>>>>>> into
>>>>>> SMX3 and SMX4 is more integration tests related. So, we should have a
>>>>>> itests
>>>>>> subproject in components where we test the deployment. What do you
>>>>>> think
>>>>>> ?
>>>>>> 2/ the configuration() method is common to all components or bundles
>>>>>> that
>>>>>> want to test its deployment on SMX4. So it can be provided by an
>>>>>> abstract
>>>>>> class and extended by all components/bundles that require this kind of
>>>>>> test.
>>>>>> The question is: where can we put this Abstract class ?
>>>>>> I propose:
>>>>>> create a new project:
>>>>>>  components/itests
>>>>>> with two subprojects:
>>>>>>  smx3 to test deployment on SMX3
>>>>>>  smx4 to test deployment on SMX4
>>>>>> with one test class per component.
>>>>>> Camel use quite the same structure:
>>>>>>
>>>>>>
>>>>>> https://svn.apache.org/repos/asf/camel/trunk/tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/
>>>>>> What do you think ?
>>>>>>
>>>>>> Thanks
>>>>>> Regards
>>>>>> JB
>>>>>>
>>>>
>>>>
>>> --
>>> Jean-Baptiste Onofré
>>> ---------------------------------
>>>  HomePage
>>> http://www.nanthrax.net
>>> ---------------------------------
>>>  Contacts
>>> jbonofre@apache.org
>>> jb@nanthrax.net
>>> ---------------------------------
>>>  OpenSource
>>> BuildProcess/AutoDeploy
>>> http://buildprocess.sourceforge.net
>>> Apache ServiceMix
>>> http://servicemix.apache.org
>>> -----------------------------------
>>> PGP : 17D4F086
>>>
>>
>>
>>
>
> --
> Jean-Baptiste Onofré
> ---------------------------------
>  HomePage
> http://www.nanthrax.net
> ---------------------------------
>  Contacts
> jbonofre@apache.org
> jb@nanthrax.net
> ---------------------------------
>  OpenSource
> BuildProcess/AutoDeploy
> http://buildprocess.sourceforge.net
> Apache ServiceMix
> http://servicemix.apache.org
> -----------------------------------
> PGP : 17D4F086
>



-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/
------------------------
Open Source SOA
http://fusesource.com

Re: [DISCUSS] Components/bundles test on SMX4

Posted by Chris Custine <ch...@gmail.com>.
+1 This sounds like a great idea.

As far as the itests, would it be a fair compromise to have itests in each
component, but have them disabled by default and only run when activated
with a maven profile?  I've done this on a few other projects and it allowed
us to run itests nightly in a special CI build configuration, but commit
triggered builds could still run as they do today with more simple tests.

Just a thought, but there are probably other options as well.

Chris

--
Chris Custine
FUSESource :: http://fusesource.com
My Blog :: http://blog.organicelement.com
Apache ServiceMix :: http://servicemix.apache.org
Apache Directory Server :: http://directory.apache.org


On Tue, Dec 15, 2009 at 5:11 AM, Jean-Baptiste Onofre <jb...@nanthrax.net>wrote:

> Guillaume, totally agreed to create a "test" sub-project in
> servicemix-common. This test project will:
> - define the requirement for the integration tests (mainly defining the
> requirements in the pom)
> - provider abstract test classes for integration/deployment test in both
> SMX3 or SMX4.
> Like this, SMX components or bundles tests are more efficient and secure.
>
> Thoughts ?
>
> If all are OK, I will create it tonight.
>
>
> Regards
> JB
>
> Guillaume Nodet wrote:
>
>> We could create a specific module, or maybe put it as part of
>> servicemix-shared SL build.
>> I think this would make sense maybe in servicemix-common to generate a
>> test jar that would include those classes.  Thoughts ?
>>
>> On Tue, Dec 15, 2009 at 12:59, Jean-Baptiste Onofre <jb...@nanthrax.net>
>> wrote:
>>
>>> Hi Guillaume,
>>>
>>> thanks for this feedback.
>>>
>>> I'm ok to embed tests in component as we make currently. My question is
>>> where we can put some abstract test classes: in the NMR commons, in a new
>>> project in servicemix-common ?
>>> I think it's better to avoid to copy/paste configuration() method in each
>>> component.
>>>
>>> Regards
>>> JB
>>>
>>> Guillaume Nodet wrote:
>>>
>>>> The problem I see with this way is that those tests won't be executed
>>>> when we release a given component.  This would only work if we release
>>>> all components together and have those tests inside the build I think.
>>>> I don't think having an integration test project per component is a
>>>> good idea too though ...
>>>>
>>>> On Tue, Dec 15, 2009 at 10:35, Charles Moulliard <cm...@gmail.com>
>>>> wrote:
>>>>
>>>>> +1 to adopt the idea follow by Camel to tests each component (= bundle)
>>>>> (Atom, Amqp, Bindy, Ftp, HTTP, ...) separately and to use an
>>>>> AbstractFeatureClass where PAX EXAM is configured to load
>>>>> bundles/features
>>>>> required to run Camel or ServiceMix.
>>>>>
>>>>> As loading karaf or servicemix4 is CPU/time consuming, all the tests
>>>>> should
>>>>> be run once
>>>>>
>>>>> Regards,
>>>>>
>>>>> Charles Moulliard
>>>>> Senior Enterprise Architect
>>>>> Apache Camel Committer
>>>>>
>>>>> *****************************
>>>>> blog : http://cmoulliard.blogspot.com
>>>>> twitter : http://twitter.com/cmoulliard
>>>>> Linkedlin : http://www.linkedin.com/in/charlesmoulliard
>>>>>
>>>>> Apache Camel Group :
>>>>> http://www.linkedin.com/groups?home=&gid=2447439&trk=anet_ug_hm
>>>>>
>>>>>
>>>>> On Tue, Dec 15, 2009 at 10:26 AM, Jean-Baptiste Onofre
>>>>> <jb...@nanthrax.net>wrote:
>>>>>
>>>>>  Hi all,
>>>>>>
>>>>>> Thanks to the Chris help, servicemix-exec component now provides unit
>>>>>> tests
>>>>>> on SMX4:
>>>>>>
>>>>>>
>>>>>>
>>>>>> http://svn.apache.org/repos/asf/servicemix/components/engines/servicemix-exec/trunk/src/test/java/org/apache/servicemix/exec/tests/smx4/ExecTest.java
>>>>>>
>>>>>> and thanks to the Charles help, I have understood why the NMR
>>>>>> 1.1.0-SNAPSHOT can't be deployed. The NMR features xml doesn't
>>>>>> contains
>>>>>> the
>>>>>> repository tag with the karaf feature.
>>>>>> It's used in Camel:
>>>>>>
>>>>>>
>>>>>> http://repository.apache.org/snapshots/org/apache/camel/karaf/features/2.1-SNAPSHOT/features-2.1-SNAPSHOT-features.xml
>>>>>>
>>>>>> I will upgrade the NMR 1.1.0-SNAPSHOT feature XML to reference to the
>>>>>> Karaf
>>>>>> 1.2.0.
>>>>>>
>>>>>> But I have a couple of questions:
>>>>>>
>>>>>> 1/ Theses tests are not really unit tests but more integration tests.
>>>>>> The marshaler tests are really unit tests as they are embedded in the
>>>>>> component. But I think that testing the deployment of the component
>>>>>> into
>>>>>> SMX3 and SMX4 is more integration tests related. So, we should have a
>>>>>> itests
>>>>>> subproject in components where we test the deployment. What do you
>>>>>> think
>>>>>> ?
>>>>>> 2/ the configuration() method is common to all components or bundles
>>>>>> that
>>>>>> want to test its deployment on SMX4. So it can be provided by an
>>>>>> abstract
>>>>>> class and extended by all components/bundles that require this kind of
>>>>>> test.
>>>>>> The question is: where can we put this Abstract class ?
>>>>>> I propose:
>>>>>> create a new project:
>>>>>>  components/itests
>>>>>> with two subprojects:
>>>>>>  smx3 to test deployment on SMX3
>>>>>>  smx4 to test deployment on SMX4
>>>>>> with one test class per component.
>>>>>> Camel use quite the same structure:
>>>>>>
>>>>>>
>>>>>> https://svn.apache.org/repos/asf/camel/trunk/tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/
>>>>>> What do you think ?
>>>>>>
>>>>>> Thanks
>>>>>> Regards
>>>>>> JB
>>>>>>
>>>>>>
>>>>
>>>>  --
>>> Jean-Baptiste Onofré
>>> ---------------------------------
>>>  HomePage
>>> http://www.nanthrax.net
>>> ---------------------------------
>>>  Contacts
>>> jbonofre@apache.org
>>> jb@nanthrax.net
>>> ---------------------------------
>>>  OpenSource
>>> BuildProcess/AutoDeploy
>>> http://buildprocess.sourceforge.net
>>> Apache ServiceMix
>>> http://servicemix.apache.org
>>> -----------------------------------
>>> PGP : 17D4F086
>>>
>>>
>>
>>
>>
> --
> Jean-Baptiste Onofré
> ---------------------------------
>  HomePage
> http://www.nanthrax.net
> ---------------------------------
>  Contacts
> jbonofre@apache.org
> jb@nanthrax.net
> ---------------------------------
>  OpenSource
> BuildProcess/AutoDeploy
> http://buildprocess.sourceforge.net
> Apache ServiceMix
> http://servicemix.apache.org
> -----------------------------------
> PGP : 17D4F086
>

Re: [DISCUSS] Components/bundles test on SMX4

Posted by Jean-Baptiste Onofre <jb...@nanthrax.net>.
Guillaume, totally agreed to create a "test" sub-project in 
servicemix-common. This test project will:
- define the requirement for the integration tests (mainly defining the 
requirements in the pom)
- provider abstract test classes for integration/deployment test in both 
SMX3 or SMX4.
Like this, SMX components or bundles tests are more efficient and secure.

Thoughts ?

If all are OK, I will create it tonight.

Regards
JB

Guillaume Nodet wrote:
> We could create a specific module, or maybe put it as part of
> servicemix-shared SL build.
> I think this would make sense maybe in servicemix-common to generate a
> test jar that would include those classes.  Thoughts ?
> 
> On Tue, Dec 15, 2009 at 12:59, Jean-Baptiste Onofre <jb...@nanthrax.net> wrote:
>> Hi Guillaume,
>>
>> thanks for this feedback.
>>
>> I'm ok to embed tests in component as we make currently. My question is
>> where we can put some abstract test classes: in the NMR commons, in a new
>> project in servicemix-common ?
>> I think it's better to avoid to copy/paste configuration() method in each
>> component.
>>
>> Regards
>> JB
>>
>> Guillaume Nodet wrote:
>>> The problem I see with this way is that those tests won't be executed
>>> when we release a given component.  This would only work if we release
>>> all components together and have those tests inside the build I think.
>>> I don't think having an integration test project per component is a
>>> good idea too though ...
>>>
>>> On Tue, Dec 15, 2009 at 10:35, Charles Moulliard <cm...@gmail.com>
>>> wrote:
>>>> +1 to adopt the idea follow by Camel to tests each component (= bundle)
>>>> (Atom, Amqp, Bindy, Ftp, HTTP, ...) separately and to use an
>>>> AbstractFeatureClass where PAX EXAM is configured to load
>>>> bundles/features
>>>> required to run Camel or ServiceMix.
>>>>
>>>> As loading karaf or servicemix4 is CPU/time consuming, all the tests
>>>> should
>>>> be run once
>>>>
>>>> Regards,
>>>>
>>>> Charles Moulliard
>>>> Senior Enterprise Architect
>>>> Apache Camel Committer
>>>>
>>>> *****************************
>>>> blog : http://cmoulliard.blogspot.com
>>>> twitter : http://twitter.com/cmoulliard
>>>> Linkedlin : http://www.linkedin.com/in/charlesmoulliard
>>>>
>>>> Apache Camel Group :
>>>> http://www.linkedin.com/groups?home=&gid=2447439&trk=anet_ug_hm
>>>>
>>>>
>>>> On Tue, Dec 15, 2009 at 10:26 AM, Jean-Baptiste Onofre
>>>> <jb...@nanthrax.net>wrote:
>>>>
>>>>> Hi all,
>>>>>
>>>>> Thanks to the Chris help, servicemix-exec component now provides unit
>>>>> tests
>>>>> on SMX4:
>>>>>
>>>>>
>>>>> http://svn.apache.org/repos/asf/servicemix/components/engines/servicemix-exec/trunk/src/test/java/org/apache/servicemix/exec/tests/smx4/ExecTest.java
>>>>>
>>>>> and thanks to the Charles help, I have understood why the NMR
>>>>> 1.1.0-SNAPSHOT can't be deployed. The NMR features xml doesn't contains
>>>>> the
>>>>> repository tag with the karaf feature.
>>>>> It's used in Camel:
>>>>>
>>>>> http://repository.apache.org/snapshots/org/apache/camel/karaf/features/2.1-SNAPSHOT/features-2.1-SNAPSHOT-features.xml
>>>>>
>>>>> I will upgrade the NMR 1.1.0-SNAPSHOT feature XML to reference to the
>>>>> Karaf
>>>>> 1.2.0.
>>>>>
>>>>> But I have a couple of questions:
>>>>>
>>>>> 1/ Theses tests are not really unit tests but more integration tests.
>>>>> The marshaler tests are really unit tests as they are embedded in the
>>>>> component. But I think that testing the deployment of the component into
>>>>> SMX3 and SMX4 is more integration tests related. So, we should have a
>>>>> itests
>>>>> subproject in components where we test the deployment. What do you think
>>>>> ?
>>>>> 2/ the configuration() method is common to all components or bundles
>>>>> that
>>>>> want to test its deployment on SMX4. So it can be provided by an
>>>>> abstract
>>>>> class and extended by all components/bundles that require this kind of
>>>>> test.
>>>>> The question is: where can we put this Abstract class ?
>>>>> I propose:
>>>>> create a new project:
>>>>>  components/itests
>>>>> with two subprojects:
>>>>>  smx3 to test deployment on SMX3
>>>>>  smx4 to test deployment on SMX4
>>>>> with one test class per component.
>>>>> Camel use quite the same structure:
>>>>>
>>>>> https://svn.apache.org/repos/asf/camel/trunk/tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/
>>>>> What do you think ?
>>>>>
>>>>> Thanks
>>>>> Regards
>>>>> JB
>>>>>
>>>
>>>
>> --
>> Jean-Baptiste Onofré
>> ---------------------------------
>>  HomePage
>> http://www.nanthrax.net
>> ---------------------------------
>>  Contacts
>> jbonofre@apache.org
>> jb@nanthrax.net
>> ---------------------------------
>>  OpenSource
>> BuildProcess/AutoDeploy
>> http://buildprocess.sourceforge.net
>> Apache ServiceMix
>> http://servicemix.apache.org
>> -----------------------------------
>> PGP : 17D4F086
>>
> 
> 
> 

-- 
Jean-Baptiste Onofré
---------------------------------
  HomePage
http://www.nanthrax.net
---------------------------------
  Contacts
jbonofre@apache.org
jb@nanthrax.net
---------------------------------
  OpenSource
BuildProcess/AutoDeploy
http://buildprocess.sourceforge.net
Apache ServiceMix
http://servicemix.apache.org
-----------------------------------
PGP : 17D4F086

Re: [DISCUSS] Components/bundles test on SMX4

Posted by Guillaume Nodet <gn...@gmail.com>.
We could create a specific module, or maybe put it as part of
servicemix-shared SL build.
I think this would make sense maybe in servicemix-common to generate a
test jar that would include those classes.  Thoughts ?

On Tue, Dec 15, 2009 at 12:59, Jean-Baptiste Onofre <jb...@nanthrax.net> wrote:
> Hi Guillaume,
>
> thanks for this feedback.
>
> I'm ok to embed tests in component as we make currently. My question is
> where we can put some abstract test classes: in the NMR commons, in a new
> project in servicemix-common ?
> I think it's better to avoid to copy/paste configuration() method in each
> component.
>
> Regards
> JB
>
> Guillaume Nodet wrote:
>>
>> The problem I see with this way is that those tests won't be executed
>> when we release a given component.  This would only work if we release
>> all components together and have those tests inside the build I think.
>> I don't think having an integration test project per component is a
>> good idea too though ...
>>
>> On Tue, Dec 15, 2009 at 10:35, Charles Moulliard <cm...@gmail.com>
>> wrote:
>>>
>>> +1 to adopt the idea follow by Camel to tests each component (= bundle)
>>> (Atom, Amqp, Bindy, Ftp, HTTP, ...) separately and to use an
>>> AbstractFeatureClass where PAX EXAM is configured to load
>>> bundles/features
>>> required to run Camel or ServiceMix.
>>>
>>> As loading karaf or servicemix4 is CPU/time consuming, all the tests
>>> should
>>> be run once
>>>
>>> Regards,
>>>
>>> Charles Moulliard
>>> Senior Enterprise Architect
>>> Apache Camel Committer
>>>
>>> *****************************
>>> blog : http://cmoulliard.blogspot.com
>>> twitter : http://twitter.com/cmoulliard
>>> Linkedlin : http://www.linkedin.com/in/charlesmoulliard
>>>
>>> Apache Camel Group :
>>> http://www.linkedin.com/groups?home=&gid=2447439&trk=anet_ug_hm
>>>
>>>
>>> On Tue, Dec 15, 2009 at 10:26 AM, Jean-Baptiste Onofre
>>> <jb...@nanthrax.net>wrote:
>>>
>>>> Hi all,
>>>>
>>>> Thanks to the Chris help, servicemix-exec component now provides unit
>>>> tests
>>>> on SMX4:
>>>>
>>>>
>>>> http://svn.apache.org/repos/asf/servicemix/components/engines/servicemix-exec/trunk/src/test/java/org/apache/servicemix/exec/tests/smx4/ExecTest.java
>>>>
>>>> and thanks to the Charles help, I have understood why the NMR
>>>> 1.1.0-SNAPSHOT can't be deployed. The NMR features xml doesn't contains
>>>> the
>>>> repository tag with the karaf feature.
>>>> It's used in Camel:
>>>>
>>>> http://repository.apache.org/snapshots/org/apache/camel/karaf/features/2.1-SNAPSHOT/features-2.1-SNAPSHOT-features.xml
>>>>
>>>> I will upgrade the NMR 1.1.0-SNAPSHOT feature XML to reference to the
>>>> Karaf
>>>> 1.2.0.
>>>>
>>>> But I have a couple of questions:
>>>>
>>>> 1/ Theses tests are not really unit tests but more integration tests.
>>>> The marshaler tests are really unit tests as they are embedded in the
>>>> component. But I think that testing the deployment of the component into
>>>> SMX3 and SMX4 is more integration tests related. So, we should have a
>>>> itests
>>>> subproject in components where we test the deployment. What do you think
>>>> ?
>>>> 2/ the configuration() method is common to all components or bundles
>>>> that
>>>> want to test its deployment on SMX4. So it can be provided by an
>>>> abstract
>>>> class and extended by all components/bundles that require this kind of
>>>> test.
>>>> The question is: where can we put this Abstract class ?
>>>> I propose:
>>>> create a new project:
>>>>  components/itests
>>>> with two subprojects:
>>>>  smx3 to test deployment on SMX3
>>>>  smx4 to test deployment on SMX4
>>>> with one test class per component.
>>>> Camel use quite the same structure:
>>>>
>>>> https://svn.apache.org/repos/asf/camel/trunk/tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/
>>>> What do you think ?
>>>>
>>>> Thanks
>>>> Regards
>>>> JB
>>>>
>>
>>
>>
>
> --
> Jean-Baptiste Onofré
> ---------------------------------
>  HomePage
> http://www.nanthrax.net
> ---------------------------------
>  Contacts
> jbonofre@apache.org
> jb@nanthrax.net
> ---------------------------------
>  OpenSource
> BuildProcess/AutoDeploy
> http://buildprocess.sourceforge.net
> Apache ServiceMix
> http://servicemix.apache.org
> -----------------------------------
> PGP : 17D4F086
>



-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/
------------------------
Open Source SOA
http://fusesource.com

Re: [DISCUSS] Components/bundles test on SMX4

Posted by Jean-Baptiste Onofre <jb...@nanthrax.net>.
Hi Guillaume,

thanks for this feedback.

I'm ok to embed tests in component as we make currently. My question is 
where we can put some abstract test classes: in the NMR commons, in a 
new project in servicemix-common ?
I think it's better to avoid to copy/paste configuration() method in 
each component.

Regards
JB

Guillaume Nodet wrote:
> The problem I see with this way is that those tests won't be executed
> when we release a given component.  This would only work if we release
> all components together and have those tests inside the build I think.
> I don't think having an integration test project per component is a
> good idea too though ...
> 
> On Tue, Dec 15, 2009 at 10:35, Charles Moulliard <cm...@gmail.com> wrote:
>> +1 to adopt the idea follow by Camel to tests each component (= bundle)
>> (Atom, Amqp, Bindy, Ftp, HTTP, ...) separately and to use an
>> AbstractFeatureClass where PAX EXAM is configured to load bundles/features
>> required to run Camel or ServiceMix.
>>
>> As loading karaf or servicemix4 is CPU/time consuming, all the tests should
>> be run once
>>
>> Regards,
>>
>> Charles Moulliard
>> Senior Enterprise Architect
>> Apache Camel Committer
>>
>> *****************************
>> blog : http://cmoulliard.blogspot.com
>> twitter : http://twitter.com/cmoulliard
>> Linkedlin : http://www.linkedin.com/in/charlesmoulliard
>>
>> Apache Camel Group :
>> http://www.linkedin.com/groups?home=&gid=2447439&trk=anet_ug_hm
>>
>>
>> On Tue, Dec 15, 2009 at 10:26 AM, Jean-Baptiste Onofre <jb...@nanthrax.net>wrote:
>>
>>> Hi all,
>>>
>>> Thanks to the Chris help, servicemix-exec component now provides unit tests
>>> on SMX4:
>>>
>>> http://svn.apache.org/repos/asf/servicemix/components/engines/servicemix-exec/trunk/src/test/java/org/apache/servicemix/exec/tests/smx4/ExecTest.java
>>>
>>> and thanks to the Charles help, I have understood why the NMR
>>> 1.1.0-SNAPSHOT can't be deployed. The NMR features xml doesn't contains the
>>> repository tag with the karaf feature.
>>> It's used in Camel:
>>> http://repository.apache.org/snapshots/org/apache/camel/karaf/features/2.1-SNAPSHOT/features-2.1-SNAPSHOT-features.xml
>>>
>>> I will upgrade the NMR 1.1.0-SNAPSHOT feature XML to reference to the Karaf
>>> 1.2.0.
>>>
>>> But I have a couple of questions:
>>>
>>> 1/ Theses tests are not really unit tests but more integration tests.
>>> The marshaler tests are really unit tests as they are embedded in the
>>> component. But I think that testing the deployment of the component into
>>> SMX3 and SMX4 is more integration tests related. So, we should have a itests
>>> subproject in components where we test the deployment. What do you think ?
>>> 2/ the configuration() method is common to all components or bundles that
>>> want to test its deployment on SMX4. So it can be provided by an abstract
>>> class and extended by all components/bundles that require this kind of test.
>>> The question is: where can we put this Abstract class ?
>>> I propose:
>>> create a new project:
>>>  components/itests
>>> with two subprojects:
>>>  smx3 to test deployment on SMX3
>>>  smx4 to test deployment on SMX4
>>> with one test class per component.
>>> Camel use quite the same structure:
>>> https://svn.apache.org/repos/asf/camel/trunk/tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/
>>> What do you think ?
>>>
>>> Thanks
>>> Regards
>>> JB
>>>
> 
> 
> 

-- 
Jean-Baptiste Onofré
---------------------------------
  HomePage
http://www.nanthrax.net
---------------------------------
  Contacts
jbonofre@apache.org
jb@nanthrax.net
---------------------------------
  OpenSource
BuildProcess/AutoDeploy
http://buildprocess.sourceforge.net
Apache ServiceMix
http://servicemix.apache.org
-----------------------------------
PGP : 17D4F086

Re: [DISCUSS] Components/bundles test on SMX4

Posted by Guillaume Nodet <gn...@gmail.com>.
The problem I see with this way is that those tests won't be executed
when we release a given component.  This would only work if we release
all components together and have those tests inside the build I think.
I don't think having an integration test project per component is a
good idea too though ...

On Tue, Dec 15, 2009 at 10:35, Charles Moulliard <cm...@gmail.com> wrote:
> +1 to adopt the idea follow by Camel to tests each component (= bundle)
> (Atom, Amqp, Bindy, Ftp, HTTP, ...) separately and to use an
> AbstractFeatureClass where PAX EXAM is configured to load bundles/features
> required to run Camel or ServiceMix.
>
> As loading karaf or servicemix4 is CPU/time consuming, all the tests should
> be run once
>
> Regards,
>
> Charles Moulliard
> Senior Enterprise Architect
> Apache Camel Committer
>
> *****************************
> blog : http://cmoulliard.blogspot.com
> twitter : http://twitter.com/cmoulliard
> Linkedlin : http://www.linkedin.com/in/charlesmoulliard
>
> Apache Camel Group :
> http://www.linkedin.com/groups?home=&gid=2447439&trk=anet_ug_hm
>
>
> On Tue, Dec 15, 2009 at 10:26 AM, Jean-Baptiste Onofre <jb...@nanthrax.net>wrote:
>
>> Hi all,
>>
>> Thanks to the Chris help, servicemix-exec component now provides unit tests
>> on SMX4:
>>
>> http://svn.apache.org/repos/asf/servicemix/components/engines/servicemix-exec/trunk/src/test/java/org/apache/servicemix/exec/tests/smx4/ExecTest.java
>>
>> and thanks to the Charles help, I have understood why the NMR
>> 1.1.0-SNAPSHOT can't be deployed. The NMR features xml doesn't contains the
>> repository tag with the karaf feature.
>> It's used in Camel:
>> http://repository.apache.org/snapshots/org/apache/camel/karaf/features/2.1-SNAPSHOT/features-2.1-SNAPSHOT-features.xml
>>
>> I will upgrade the NMR 1.1.0-SNAPSHOT feature XML to reference to the Karaf
>> 1.2.0.
>>
>> But I have a couple of questions:
>>
>> 1/ Theses tests are not really unit tests but more integration tests.
>> The marshaler tests are really unit tests as they are embedded in the
>> component. But I think that testing the deployment of the component into
>> SMX3 and SMX4 is more integration tests related. So, we should have a itests
>> subproject in components where we test the deployment. What do you think ?
>> 2/ the configuration() method is common to all components or bundles that
>> want to test its deployment on SMX4. So it can be provided by an abstract
>> class and extended by all components/bundles that require this kind of test.
>> The question is: where can we put this Abstract class ?
>> I propose:
>> create a new project:
>>  components/itests
>> with two subprojects:
>>  smx3 to test deployment on SMX3
>>  smx4 to test deployment on SMX4
>> with one test class per component.
>> Camel use quite the same structure:
>> https://svn.apache.org/repos/asf/camel/trunk/tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/
>> What do you think ?
>>
>> Thanks
>> Regards
>> JB
>>
>



-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/
------------------------
Open Source SOA
http://fusesource.com

Re: [DISCUSS] Components/bundles test on SMX4

Posted by Charles Moulliard <cm...@gmail.com>.
+1 to adopt the idea follow by Camel to tests each component (= bundle)
(Atom, Amqp, Bindy, Ftp, HTTP, ...) separately and to use an
AbstractFeatureClass where PAX EXAM is configured to load bundles/features
required to run Camel or ServiceMix.

As loading karaf or servicemix4 is CPU/time consuming, all the tests should
be run once

Regards,

Charles Moulliard
Senior Enterprise Architect
Apache Camel Committer

*****************************
blog : http://cmoulliard.blogspot.com
twitter : http://twitter.com/cmoulliard
Linkedlin : http://www.linkedin.com/in/charlesmoulliard

Apache Camel Group :
http://www.linkedin.com/groups?home=&gid=2447439&trk=anet_ug_hm


On Tue, Dec 15, 2009 at 10:26 AM, Jean-Baptiste Onofre <jb...@nanthrax.net>wrote:

> Hi all,
>
> Thanks to the Chris help, servicemix-exec component now provides unit tests
> on SMX4:
>
> http://svn.apache.org/repos/asf/servicemix/components/engines/servicemix-exec/trunk/src/test/java/org/apache/servicemix/exec/tests/smx4/ExecTest.java
>
> and thanks to the Charles help, I have understood why the NMR
> 1.1.0-SNAPSHOT can't be deployed. The NMR features xml doesn't contains the
> repository tag with the karaf feature.
> It's used in Camel:
> http://repository.apache.org/snapshots/org/apache/camel/karaf/features/2.1-SNAPSHOT/features-2.1-SNAPSHOT-features.xml
>
> I will upgrade the NMR 1.1.0-SNAPSHOT feature XML to reference to the Karaf
> 1.2.0.
>
> But I have a couple of questions:
>
> 1/ Theses tests are not really unit tests but more integration tests.
> The marshaler tests are really unit tests as they are embedded in the
> component. But I think that testing the deployment of the component into
> SMX3 and SMX4 is more integration tests related. So, we should have a itests
> subproject in components where we test the deployment. What do you think ?
> 2/ the configuration() method is common to all components or bundles that
> want to test its deployment on SMX4. So it can be provided by an abstract
> class and extended by all components/bundles that require this kind of test.
> The question is: where can we put this Abstract class ?
> I propose:
> create a new project:
>  components/itests
> with two subprojects:
>  smx3 to test deployment on SMX3
>  smx4 to test deployment on SMX4
> with one test class per component.
> Camel use quite the same structure:
> https://svn.apache.org/repos/asf/camel/trunk/tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/
> What do you think ?
>
> Thanks
> Regards
> JB
>