karaf-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Baptiste Onofré ...@nanthrax.net>
Subject Re: paxexam labs question
Date Wed, 18 Jan 2012 19:57:20 GMT

I guess that you name "pax exam lab" is the Karaf Pax Exam, especially 


You can execute commands directly in your Karaf itests with something like:

String response;
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
PrintStream printStream = new PrintStream(byteArrayOutputStream);
CommandProcessor commandProcessor = getOsgiService(CommandProcessor.class);
CommandSession commandSession = 
commandProcessor.createSession(System.in, printStream, System.err);
commandSession.execute("bundle:install mvn:groupId/artifactId...");
String output = return byteArrayOutputStream.toString();

So it means that you can install your bundle/feature, etc as you can do 
in Karaf directly.


On 01/17/2012 10:12 PM, Vestal, Rick wrote:
> Hi all,
> Finally back to some osgi work and was very happy to see ServiceMix
> 4.4.0 out so that I can move to it and not lose the paxexam karaf test
> framework.
> I've got a question on how other users are testing their modules.
> Ideally, I'd like to have a set of integration tests live in the osgi
> bundle module that use the paxexam labs work.  The problem I'm running
> into is that the 'latest' version of my osgi bundle isn't what is
> provisioned as the provision option is picking up the last one installed
> into my local maven repository.
> Is there an option to make the provision call use the 'just packaged'
> bundle?
> Thanks,
> -- Rick

Jean-Baptiste Onofré
Talend - http://www.talend.com

View raw message