Search code examples
serviceosgipax-exam

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 test.

Is there another way to activate the declarative services?

Many thanks.


Solution

  • Have a look at DeclarativeServicesTest in the Pax Exam integration test suite for a working example.