Executing a Karaf command in Pax Exam Test

classic Classic list List threaded Threaded
3 messages Options
JT
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Executing a Karaf command in Pax Exam Test

JT
Hi,

I'm writing an integration test and in it I want to execute the Karaf 'install' command. I don't want to provision the bundle at Karaf start-up but specifically attempt to install it in a test to ensure a certain behaviour occurs.

I found this page: http://planet.jboss.org/post/advanced_integration_testing_with_pax_exam_karaf and it makes use of a 'CommandProcessor' interface but searching the current Karaf source code it appears this class no longer exists.

Is there a way that I can achieve the above?

Thanks

Kerry

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Executing a Karaf command in Pax Exam Test

Achim Nierbeck
Hi, 


btw. if in doubt, there are a couple of tests around that class using it.
So there should be plenty of samples ;) 

regards, Achim 


2017-08-13 14:06 GMT+02:00 Kerry <[hidden email]>:
Hi,

I'm writing an integration test and in it I want to execute the Karaf 'install' command. I don't want to provision the bundle at Karaf start-up but specifically attempt to install it in a test to ensure a certain behaviour occurs.

I found this page: http://planet.jboss.org/post/advanced_integration_testing_with_pax_exam_karaf and it makes use of a 'CommandProcessor' interface but searching the current Karaf source code it appears this class no longer exists.

Is there a way that I can achieve the above?

Thanks

Kerry




--

Apache Member
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/>
Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>

Software Architect / Project Manager / Scrum Master 

JT
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Executing a Karaf command in Pax Exam Test

JT

Thanks Achim. I also discovered from that code the BootFinished class.. very useful to know.


On 13/08/17 13:52, Achim Nierbeck wrote:
Hi, 


btw. if in doubt, there are a couple of tests around that class using it.
So there should be plenty of samples ;) 

regards, Achim 


2017-08-13 14:06 GMT+02:00 Kerry <[hidden email]>:
Hi,

I'm writing an integration test and in it I want to execute the Karaf 'install' command. I don't want to provision the bundle at Karaf start-up but specifically attempt to install it in a test to ensure a certain behaviour occurs.

I found this page: http://planet.jboss.org/post/advanced_integration_testing_with_pax_exam_karaf and it makes use of a 'CommandProcessor' interface but searching the current Karaf source code it appears this class no longer exists.

Is there a way that I can achieve the above?

Thanks

Kerry




--

Apache Member
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/>
Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>

Software Architect / Project Manager / Scrum Master 


Loading...