Hi Gerald, I suggest sticking to testing with pax-exam or even better using paxexam-karaf. I have the following reasons for this :)
If you want to use blueprint jpa or something like this, I experienced trouble with pojoSR not being capable of providing some needed functionality for the jpa part of blueprint. It uses some internal OSGi method which resolves to a null-pointer exception. So this is not really capable for doing intense tests right now. (if I find some time I might add some patches :) ) But it's good enough to test some basic blueprint wiring stuff. pax-exam is far better in usage since it really starts a container though this might increase the timing on the test. Though this can be some troublesome to get all required bundles working together this way. It needs some trial and error to have the right set of bundles available :) Though right now I also face an issue with this setup and blueprint:jpa. A rather strange Classcast excpetion. Somehow the javax.persistence Classes used by blueprint-jpa while instanciating the Entity objects is not the same when trying to find the corresponding meta-data. Somehow the Entity class used in both cases are not the same (classloader issue :( ) Now finally if you use paxexam-karaf you have all the required bundles at hand and if you use jpa it magically seems to work right away (no idea what the difference is right now, still investigating :) ) And of course if you are gonna use specialties in setup etc. this test-framework gives you just the right amount of power to get along :) Hope this helps some :) regards, Achim 2012/6/25 Gerald Preissler <[email protected]>: > Hi there, > > I've started to work on a blueprint-based application, and basically the > subject already says what I'm looking for :-) I googled around a little bit > and found the following two blogposts that seem interesting: > > http://iocanel.blogspot.de/2012/01/advanced-integration-testing-with-pax.html > > http://gnodet.blogspot.de/2012/01/unit-testing-camel-blueprint-routes.html > > The library provided by Guillaume looks like a possible solution, but I'd > like to ask if there is anything that I overlooked in my search and that > might be helpful when testing blueprint contexts > > Any other suggestions or hints regarding the topic are highly welcome as > well. > > Best regards > > Jerry -- Apache Karaf <http://karaf.apache.org/> Committer & PMC OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer & Project Lead OPS4J Pax for Vaadin <http://team.ops4j.org/wiki/display/PAXVAADIN/Home> Commiter & Project Lead blog <http://notizblog.nierbeck.de/>
