3

I have create a MagicDraw plugin and JUnit tests also. The tests are annotated with

@RunWith (MagicDrawTestRunner.class)

as it is written in the official documentation. When I tun the maven command to package it, I get this error:

java.lang.IllegalStateException: Application has to be started inside OSGI Framework

Does anybody know how should I set up my Maven Surefire plugin in order to get a running test case?

1 Answers1

3

I have never had much luck with their test API. You may be better off running your test using the pattern i first saw here:

https://github.com/IncQueryLabs/MD_plugin_skeleton/wiki/MD-Plugin-Test-Environment

You could also try opening a ticket on nomagics support system and asking this question there; though if they dont bother to have correct documentation for testing, IDK how helpful they will be.

Last but not least, try finding anyone that has done OSGi development preferably on Eclipse Equinox (Magicdraw is built on equinox); I bet the code to start the OSGi would be rather straight forward for them.

good luck.

Randall Hudson
  • 196
  • 1
  • 7