java - JUnit Plug-in Tests Ignoring Target Platform -
i've used archetype tycho-eclipse-plugin-archetype create simple eclipse plug-in working integration test project. except... doesn't.
when start test "junit plug-in test" following exception:
!entry org.eclipse.osgi 2 0 2016-01-07 14:43:35.734 !message 1 or more bundles not resolved because following root constraints not resolved: !subentry 1 org.eclipse.osgi 2 0 2016-01-07 14:43:35.734 !message bundle initial@reference:file:../../../../../../../users/myname/.eclipse/org.eclipse.platform_4.5.1_2043537226_win32_win32_x86_64/plugins/org.eclipse.pde.junit.runtime_3.4.500.v20150423-1241.jar/ not resolved. !subentry 2 org.eclipse.pde.junit.runtime 2 0 2016-01-07 14:43:35.734 !message missing required bundle org.eclipse.core.runtime_[3.11.0,4.0.0).
(and similar messages other plug-ins.)
which weird, because target platform contains org.eclipse.pde.junit.runtime
3.4.300, not 3.4.500, requires org.eclipse.core.runtime
version [3.3.0,4.0.0). run configuration test case agrees version , attests "no problems detected."
so fact path contains "/org.eclipse.platform_4.5.1" assume takes running eclipse target platform, though there's set in workspace , in run configuration.
how change junit plug-in tests take active target platform?
it works in eclipse 4.4.2 (luna), it's 1 of "features" of eclipse mars.
addition: as explained here, eclipse uses plug-ins application folder when can't find them in workspace's target platform. makes tests fail when workspace , eclipse target platform differ. solution a) use same eclipse version development , project or b) use cristall ball figure out test plug-ins missing , add them project's target platform.
Comments
Post a Comment