Hi

Don't forget to install the required features like camel-http.

Regards
JB

--
Jean-Baptiste Onofré
[email protected]
http://blog.nanthrax.net
Talend - http://wwx.talend.com

----- Reply message -----
From: "ozzyoli" <[email protected]>
To: <[email protected]>
Subject: How to test my Camel Routes on Karaf using Pax-Exam?
Date: Wed, May 21, 2014 5:36 pm


The solution to what I was looking for was Server Mode

https://ops4j1.jira.com/wiki/display/PAXEXAM3/Server+Mode

Thanks
Oli

On 21 May 2014, at 14:29, Achim Nierbeck [via Karaf] 
<[email protected]> wrote:

> Dependencies for tests, always need to be declared in the @Configuration 
> method. 
> 
> regards, Achim 
> 
> 
> 2014-05-21 15:24 GMT+02:00 ozzyoli <[hidden email]>:
> Hi Christian
> 
> I have a maven dependancy that is needed by my unit test (the bundles being 
> tested don’t need the dependancy, just the unit test does!). Is there anyway 
> for Pax Exam to automatically pick this up from my pom.xml or do I need to 
> manually add it to the @Configuration method (along with the six transitive 
> dependencies that it has)?
> 
> Oli
> 
> <dependancy>
>         <groupId>ca.uhn.hapi.fhir</groupId>
>         <artifactId>hapi-fhir-base</artifactId>
>         <version>0.3</version>
>         <scope>test</scope>
> </dependancy>
> 
> On 21 May 2014, at 14:19, cschneider [via Karaf] <[hidden email]> wrote:
> 
> > You have to define all dependencies in the pax exam @Configuration.
> >
> > The karaf test container of pax exam starts an empty karaf by default.
> > Inside the @Configuration method you then define the bundles and
> > features you need on top of this.
> >
> > See https://ops4j1.jira.com/wiki/display/PAXEXAM3/Karaf+Container
> > and this for the full example:
> > https://github.com/ops4j/org.ops4j.pax.exam2/tree/master/samples/exam-itest-sample-karaf
> >
> > For camel you have to install the camel feature repo and the camel
> > features you use.
> >
> > Christian
> >
> > On 21.05.2014 15:13, ozzyoli wrote:
> >
> > > I'd like to test my camel routes (which have Http endpoints) which are
> > > deployed on my custom karaf distro.
> > >
> > > The problem with using Pax Exam is that the tests are executed as bundles
> > > inside the container.
> > >
> > > I'd like my test to treat karaf as a black box. Use a simple HttpClient to
> > > make requests to Karaf and process the results.
> > >
> > > If I run the test inside Pax Exam my tests fail because my dependencies
> > > (e.g. Apache HttpClient) aren't found in any of the bundles deployed in
> > > karaf.
> > >
> > > I think i'm missing something obvious here, any help would be greatly
> > > appreciated. Thank you
> > >
> > > Oli
> > >
> > >
> > >
> > >
> > >
> > >
> > > --
> > > View this message in context: 
> > > http://karaf.922171.n3.nabble.com/How-to-test-my-Camel-Routes-on-Karaf-using-Pax-Exam-tp4033218.html
> > > Sent from the Karaf - User mailing list archive at Nabble.com.
> >
> >
> > --
> > Christian Schneider
> > http://www.liquid-reality.de
> >
> > Open Source Architect
> > http://www.talend.com
> >
> >
> >
> > If you reply to this email, your message will be added to the discussion 
> > below:
> > http://karaf.922171.n3.nabble.com/How-to-test-my-Camel-Routes-on-Karaf-using-Pax-Exam-tp4033218p4033219.html
> > To unsubscribe from How to test my Camel Routes on Karaf using Pax-Exam?, 
> > click here.
> > NAML
> 
> 
> 
> 
> 
> --
> View this message in context: 
> http://karaf.922171.n3.nabble.com/How-to-test-my-Camel-Routes-on-Karaf-using-Pax-Exam-tp4033218p4033220.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
> 
> 
> 
> -- 
> 
> Apache Karaf <http://karaf.apache.org/> Committer & PMC
> OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer & 
> Project Lead
> blog <http://notizblog.nierbeck.de/>
> 
> Software Architect / Project Manager / Scrum Master
> 
> 
> 
> If you reply to this email, your message will be added to the discussion 
> below:
> http://karaf.922171.n3.nabble.com/How-to-test-my-Camel-Routes-on-Karaf-using-Pax-Exam-tp4033218p4033222.html
> To unsubscribe from How to test my Camel Routes on Karaf using Pax-Exam?, 
> click here.
> NAML





--
View this message in context: 
http://karaf.922171.n3.nabble.com/How-to-test-my-Camel-Routes-on-Karaf-using-Pax-Exam-tp4033218p4033223.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Reply via email to