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
4
votes
1 answer

ClassNotFoundException when using anonymous class in Pax Exam test method

I'm getting a ClassNotFoundException when using an anonymous class in a Pax Exam test method. My test class: package com.bssys.ebpp.paxexam; import static org.ops4j.pax.exam.CoreOptions.maven; import static…
Peter Schura
  • 130
  • 2
  • 15
4
votes
1 answer

Pax Exam j2ee integration test, how to write more than one test class using custom war probe?

I used wildfly 8.2.0.Final as the Java EE Container for Pax Exam 4.5.0 java ee integration test. If I only use one test class, then it works fine. However if I used more than one test classes, then it show following error: using the PerSuite reactor…
diufanman
  • 201
  • 1
  • 8
4
votes
0 answers

RMI NotBoundException using pax-exam karaf container

I am trying to use pax-exam-container-karaf for testing an OSGi bundle. When running the test, the test "hangs" for a few minutes then "dies" with the following exception: java.lang.RuntimeException: Cannot get the remote bundle context at…
Steve Ebersole
  • 9,339
  • 2
  • 48
  • 46
4
votes
0 answers

Test osgi with Pax Exam

Now I am using Pax Exam to test OSGI ,but when i create a osgi helloworld project,how should i use PaxExam to create a junit test project to test helloworld osgi? Thanks!
echo
  • 41
  • 4
4
votes
3 answers

How does Arquillian compare to Pax Exam for OSGi (integration) testing?

I am currently investigating how best to test our OSGi application intended to run on Apache Karaf. The obvious option is Pax Exam with labs-paxexam-karaf (see http://iocanel.blogspot.com/2012/01/advanced-integration-testing-with-pax.html for a…
Alexey Romanov
  • 167,066
  • 35
  • 309
  • 487
3
votes
2 answers

BundleContext is null in unit tests using pax-exam

I'm using pax-exam to load, activate and access osgi bundles. The following source code is my pax-exam test and it runs using pax-exam 2.3 using native container. package fr.xlim.ssd.vtg.osgi; import java.net.URISyntaxException; import…
Kartoch
  • 7,610
  • 9
  • 40
  • 68
3
votes
1 answer

PAX Exam - Class not found error

I'm working on PAX integration tests for our project and I'm facing few issues with regards to class loading. I have deployed few bundles in PAX (used karaf container). Once the karaf is up, I could see my bundles and services are up and active.…
Rajasekar
  • 31
  • 1
3
votes
2 answers

How to access resources in Pax Exam test probe bundle?

I'm developing integration tests for some OSGi bundles using Pax Exam 4.8, junit4, JBoss Fuse as OSGi container. Assume standard Maven setup. The container starts, my bundles are deployed and correctly started. Now in my test code I need to load a…
Alessandro Da Rugna
  • 4,571
  • 20
  • 40
  • 64
3
votes
0 answers

OSGi Pax Exam 4 gogo shell parser fails parsing gosh_profile when starting paxexam 4 test

I am trying to enable the Felix GoGo Shell within my PaxExam Test class. This is just for simple interaction reason with the OSGi container while developing a bundle. Here is my PaxExam Test Class: import java.io.IOException; import…
dieterl
  • 31
  • 3
3
votes
1 answer

Pax Exam + Karaf container inject Custom Service encounters ClassNotFoundException

Recently I wrote a integration test running in Karaf container which using Pax Exam,here is my code: package com.mercury.mof.integration.tests; import static org.ops4j.pax.exam.CoreOptions.maven; import static…
3
votes
1 answer

Pax Exam / Karaf - Install Feature on test setup

I am attempting to integration test a Karaf feature with Pax Exam but I cant work out how to install a feature in my config() method. Pax Exam is version 2.6.0 and Apache Karaf 2.3.2. This is my config method: @Configuration public Option[]…
samlewis
  • 3,950
  • 27
  • 27
3
votes
1 answer

Configuring pax-logging in a native container with pax-exam

I know this is a bit specific, but I've tried everything I could think of. I am running some integration tests using pax-exam, and logging is supposed to use pax-logging. This works fine when directly running the felix container, but if I start it…
Miquel
  • 15,405
  • 8
  • 54
  • 87
3
votes
1 answer

IllegalStateException when running Pax Exam

I get the following exception when running Pax Exam. My configuration includes a single bundle from file system and junit and felix only. Any idea why this happens? java.lang.IllegalStateException: Stream handler unavailable due to: null at…
Nufail
  • 1,588
  • 1
  • 17
  • 31
2
votes
3 answers

How to upgrade groovy-all from 2.4 to 2.5 when running in OSGi?

I'm maintaining an open source library based partly on Groovy called Rest Assured. In the next version I'd like to upgrade the Groovy dependency from 2.4.x to 2.5.x. However when doing this I run into issues when running the OSGi tests. The tests…
Johan
  • 37,479
  • 32
  • 149
  • 237
2
votes
0 answers

Facing issue in PAX exam with karaf 4.1.4

We have recently upgraded our production environment from Karaf 3 to Karaf 4.1.4. Everything seems to be fine in production. But we are facing issue when upgrading our "pax-exam" to use Karaf 4.1.4. After upgrading , our test suit is always…
Harish
  • 21
  • 1
1
2 3
8 9