Ticket #753 (new Enhancement)

Opened 10 years ago

Last modified 10 years ago

Consuming the plugins service implementation in a test

Reported by: Malte Owned by: jri
Priority: Major Milestone:
Component: DeepaMehta Standard Distribution Version: 4.4
Keywords: Cc: dgf
Complexity: 3 Area:
Module:

Description

For example, simply declaring a PluginService? as instance-variable:

@Inject
TaggingService taggingService;

.. in a .java class under (same package name of the ordinary sources) the "src/test" folder, in this case for the TaggingPlugin? itself, does not work. TaggingService? is null when the test is executed.

Any hints on how plugins can write tests for their service-methods?

Thanks & Kind regards!

Change History

comment:1 Changed 10 years ago by jri

  • Cc dgf added

Testing the services provided by plugins is currently not supported. This is because at the time when Maven runs the tests no OSGi container is running at all.

dgf once setup a DM testing environment based on Pax Exam. However this is not maintained anymore (I think it was at DM3 times).
https://ops4j1.jira.com/wiki/display/PAXEXAM3/Pax+Exam

So, sorry, no solution at the moment. But I think dgf should be interested in this topic too ... :-)

Note: See TracTickets for help on using tickets.