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
0
votes
0 answers

Gradle unable to resolve version for dependency

My project depends on the Pax Exam framework. I declare, among others, these dependencies on Pax (PAX_EXAM_VERSION = 3.4.0): compile group: 'org.ops4j.pax.exam', name: 'pax-exam-junit4', version: PAX_EXAM_VERSION compile group: 'org.ops4j.pax.exam',…
Renato
  • 12,940
  • 3
  • 54
  • 85
0
votes
1 answer

PAX Exam - @Before method not called

I'm trying to setup tests with PAX Exam as follows: @ExamReactorStrategy(PerMethod.class) public class AbstractTest { @Configuration public Option[] config() { return options( junitBundles(), /* PAX…
manash
  • 6,985
  • 12
  • 65
  • 125
0
votes
3 answers

Activate Declarative Services with Pax Exam 3.X

Currently I'm using Pax Exam 3.X (Native container: apache.felix.framework) to test an OSGi application. I'm trying to start the declarative services automatically, but I can only start them calling the activate() method explicitly inside every…
0
votes
2 answers

Where should paxexam tests reside?

We're using paxexam 3.3.0 to test bundles running in Karaf 3.0.0 utilizing karafDistributionConfiguration() to deploy feature files. A typical usecase looks like: Bundle 1 -- REST http service Bundle 2 -- Service implementation calling external…
0
votes
1 answer

Timeout on pax exam (karaf) unit-test on linux jenkins

I have started using PAX-EXAM with Karaf container to test our application. Sometimes the test just hangs before the test methods starts and it always hangs on cxf registering mbeans: registering MBean…
Marcus
  • 1,866
  • 1
  • 20
  • 33
0
votes
2 answers

Running test with PaxExam 3.x - TestNg

Edited to simplify the example... I'm migrating the system to Maven. I want to use PaxExam to run the test with TestNg. I'm trying to run a simple test using PaxExam: pom.xml:
0
votes
2 answers

Pax Exam 3.3.0 - How to load a utility jar?

I am using the latest Pax Exam (3.3.0) for OSGi testing. I have Pax Exam up and running, deploying and starting my bundles etc. Life is good. I also have a utility project containing various factories and other helpful functionality that I want to…
protectedmember
  • 349
  • 5
  • 20
0
votes
1 answer

Pax Exam tests fail occasionally

I am testing CXF REST services in Karaf using Pax Exam. The tests almost always run without a hitch on my machine. When run in Jenkins (under Maven build) they typically fail. The failures seem random and unpredictable. The error I receive during…
Michael Smolyak
  • 593
  • 2
  • 6
  • 21
0
votes
1 answer

Pax Exam 2.6.0 + Karaf 2.3.0 - Debugging in Eclipse fails - NotBoundException

I have been using Pax Exam 2.6.0 for running integration tests on Apache Karaf 2.3.0 via the Karaf Exam Container. Everything works as expected, except for local debugging (not remote) of an integration test from Eclipse. I found a proposed solution…
0
votes
1 answer

OSGI Pax Exam simple test running on maven but not on IDE

I am doing a very simple Pax Exam test. While running it with maven "mvn verify", it is success. While running it with my IDE, I get the following error. Anyone know if I am missing a jar or is this a bug ? Thanks, java.lang.Exception: No tests…
lleclerc
  • 653
  • 5
  • 10
0
votes
3 answers

What's the maven SNAPSHOT dependency update policy in pax-exam?

I am using pax-exam to run my osgi unit testing right now. In the project which I am working on, there are many sub-modules and dependency relation between bundles. Right now, the version of bundles in my project is x.x.x-SNAPSHOT. I set up the…
0
votes
1 answer

Pax Exam Karaf: mavenBundle configuration option works, bundle with file: URL doesn't

This works with Pax Exam native container (Pax Exam 2.3.1), but not with Pax Exam Karaf container (0.5.2) for me: @Configuration public Option[] config() { return options( // karafDistributionConfiguration() //…
Alexey Romanov
  • 167,066
  • 35
  • 309
  • 487
-1
votes
1 answer

pax-exam (v2.5) - fails to deploy camel-xstream

I am trying to understand/get a working example of PAX-EXAM. From my understanding, i need to deploy the bundle i want to test (in this case, boohoo-esb-common) and any bundles that it uses (in this case, camel-xstream). However, when i try to run…
Gareth H
  • 103
  • 2
  • 14
-2
votes
1 answer

Multiple @Test method in a java class fails with java.lang.Exception: No runnable methods

I have multiple @Test method in a class while running the paxexam it fails with the below Exception java.lang.Exception: No runnable methods at org.junit.runners.BlockJUnit4ClassRunner.validateInstanceMethods(BlockJUnit4ClassRunner.java:169) …
Charity
  • 213
  • 1
  • 5
  • 23
1 2 3
8
9