Questions tagged [pax-exam]

Pax Exam is a testing toolkit that addresses the need for bundle-level testing.

When a Pax Exam test is run, it starts an OSGi framework, installs and starts a selection of bundles, and then makes an OSGi BundleContext available through which you can make assertions about your bundles, the services that they publish, and the effects that they have on each other.

134 questions
2
votes
0 answers

JBoss Fuse 6.x to run PAX-EXAM itests with JDK 1.8

Seems like artifacts of JBoss Fuse 6.2.x and 6.3.x compiled with JDK 1.7 and PAX-EXAM itests work fine, though they error out with JDK 1.8. Same applies if you create own OSGI bundle and use Maven dependency:
ak76
  • 167
  • 2
  • 8
2
votes
0 answers

Bundle wiring is no longer valid for Pax-Exam probe

I developed a perfectly working test in Pax-Exam 4.8.0 and Karaf 4.0.3: I recently upgraded both Pax-Exam and Karaf and now I'm trying to debug a quite obscure error I get with Pax-Exam 4.9.1 and Karaf 4.0.6. You can find a self contained example of…
matteo rulli
  • 1,443
  • 2
  • 18
  • 30
2
votes
1 answer

PaxExam OSGI Container and ServiceLookupException

I have built a very simple bundle which has zero dependencies and imports no packages. Its only content is a CalculatorService interface and corresponding implementation class containing just a simple add(int a, int b) method. I have created two…
Randy Leonard
  • 655
  • 7
  • 21
2
votes
1 answer

Accessing compiled resources in a Pax Exam contained test

I've been trying to run a JMH benchmark test in an OSGI container created with Pax Exam (similarly to how it's described in this SO answer, but with Pax Exam thrown into the mix as well). But am having some problems getting the JMH generated…
Deiwin
  • 420
  • 5
  • 21
2
votes
2 answers

Pax Exam 4 and multiple Maven repositories not working

I'm trying to run a very basic Pax Exam 4 unit test but one that needs to access multiple Maven repositories (not Maven Central). Here's the code: @RunWith(PaxExam.class) public class ExamTest { @Inject private BundleContext bundleContext; …
2
votes
1 answer

PaxExam and CmPropertyPlaceholder

i'm trying to implement PaxExam to test a blueprint camel route:
DaFanc
  • 23
  • 2
2
votes
2 answers

How to specify system package exports in pax exam

Pax exam is used to test Apache CXF Distributed OSGi. I recently updated to apache felix 4.2.1. In the newer version of felix I get problems with packages exported by cxf spec bundles and the system bundle. No idea why this did not occur with the…
Christian Schneider
  • 19,420
  • 2
  • 39
  • 64
2
votes
2 answers

How to retrieve OSGi service instance defined in blueprint.xml while writing pax-exam test?

I want to know if anyone has tried to test beans/services exposed through blueprint.xml working in pax-exam using native container. I have a project with two bundles - a) config - interface classes b) config-impl - contains implementation and…
Unic Man
  • 41
  • 4
2
votes
1 answer

Pax exam 2: gave up waiting for service

I'm trying to make some pax-exam-karaf tests with many bundles (cxf-jaxrs, aries-tx, jpa...). Tests are working great on my local environment (a strong i7 computer), but fails on my C.I server: Caused by:…
Tcharl
  • 341
  • 3
  • 16
2
votes
2 answers

OSGI Integration testing, Pax Exam probe executing tests before container bundles start

I'm currently trying to write an OSGI integration tests using PAX-EXAM+KARAF and faced a problem that pax exam trying to execute test methods before dependent bundles are actually started/initialized in container. What's strange, sometimes test…
user2107244
  • 31
  • 1
  • 4
2
votes
1 answer

PaxExam exception running tests

I am new to Pax Exam and trying to run tests by calling my OSGI service. I am getting following exception when running paxexam test in eclipse. java.lang.ClassNotFoundException: org.ops4j.pax.swissbox.framework.ServiceLookupException (no …
Rahul Rohilla
  • 105
  • 1
  • 2
  • 8
2
votes
1 answer

Using PaxExam with Bndtools

did someone ever tried to run PaxExam Junit tests with Bndtools and can give me some advices? I've tried it by myself, but without Maven it's a pain to download all the dependencies. What I've done so far: Download PaxExam dependencies from Central…
christian.vogel
  • 2,117
  • 18
  • 22
2
votes
2 answers

Pax Exam runs test twice

This is my trivial Pax Exam test: package ru.focusmedia.odp.server.datastore.itests; import static org.ops4j.pax.exam.CoreOptions.felix; import static org.ops4j.pax.exam.CoreOptions.options; import javax.inject.Inject; import…
Alexey Romanov
  • 167,066
  • 35
  • 309
  • 487
1
vote
1 answer

Using Flyway application integration with Pax Exam to test OSGi application

When trying to use Flyway application integration to test an OSGi application using Pax Exam, I get the following error: myTest:myTest.myTest:PaxRunnerTestContainer{felix}(com.example.sys.test.paxtests.myTest): javax.sql.DataSource not found by…
1
vote
0 answers

How to resolve remote bundle context pax.exam error?

I'm trying to run some integration tests but the test failed due to a pax.exam error. Error java.lang.RuntimeException: Cannot get the remote bundle context at…
Asha
  • 805
  • 3
  • 10
  • 18
1
2
3
8 9