+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 <[email protected]>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 >
