Hi,

I try to test if my feature works as expected via pax exam.

Imagine my project structure as follows:

|
|-my.bundle
|-features
|-itests
|-pom.xml


so I have a parent pom which defines the version for all child poms. the feature contains the installation of the my.bundle with version ${project.version}. In the itest I would like to test if the correct version of my.bundle is installed without errors.

therefor I install the feature in the configure method and now I would like to test if the bundle is installed. I got it working to test if the bundle is installed but I struggle around with the correct version as I don't know the correct version in the test. What I would like to do is: get the ${project.version} value in the test method. First I tried to provide it via system-property via surefire configuration, but I guess the system property is not available in karaf container when executing the test.

The next approach was to get the test bundle version via:

bundleContext.getBundle().getVersion().toString() but the provisioning bundle created by pax exam always has the version 0.0.0


Is there another way to determine the correct version?

best regards, Marco

--
++ Business-Software aus einer Hand ++
++ Internet, Warenwirtschaft, Linux, Virtualisierung ++
http://www.intersales.de
http://www.eisxen.org
http://www.tarantella-partner.de
http://www.medisales.de
http://www.eisfair.net

interSales AG Internet Commerce
Weinsbergstr. 190
50825 Köln

Tel  02 21 - 27 90 50
Fax  02 21 - 27 90 517
Mail isi...@intersales.de
Mail m...@intersales.de
Web  www.intersales.de

Handelsregister Köln HR B 30904
Ust.-Id.: DE199672015
Finanzamt Köln-Nord. UstID: nicht vergeben
Aufsichtsratsvorsitzender: Michael Hippler
Vorstand: Andrej Radonic, Peter Zander

Reply via email to