Note that there are some explanatory texts on larger screens.

plurals
  1. PORight target platform for running JUnit plugin tests in Eclipse Indigo?
    primarykey
    data
    text
    <p>For my Eclipse plugin project, I have defined the following target platform:</p> <pre><code>&lt;location includeAllPlatforms="true" includeMode="slicer" includeSource="true" type="InstallableUnit"&gt; &lt;unit id="org.eclipse.equinox.executable.feature.group" version="3.5.0.v20110530-7P7NFUFFLWUl76mart"/&gt; &lt;unit id="org.eclipse.rcp.sdk.id" version="3.7.1.M20110909-1335"/&gt; &lt;unit id="org.eclipse.jdt.feature.group" version="3.7.1.r371_v20110810-0800-7z8gFcoFMLfTabvKsR5Qm9rBGEBK"/&gt; &lt;unit id="epp.package.java" version="1.4.1.20110909-1818"/&gt; ... </code></pre> <p>My plugin has JUnit plugin tests (in the same plugin). If I try to run them with a JUnit launch config (<code>org.eclipse.platform.ide</code>), I get the following console messages about <code>junit</code>, and an exception:</p> <pre><code>!ENTRY org.eclipse.osgi 2 0 2011-12-16 13:00:35.206 !MESSAGE One or more bundles are not resolved because the following root constraints are not resolved: !SUBENTRY 1 org.eclipse.osgi 2 0 2011-12-16 13:00:35.206 !MESSAGE Bundle reference:file:/Users/stolz/ws-bucky/.metadata/.plugins/org.eclipse.pde.core/.bundle_pool/plugins/org.eclipse.jdt.junit4.runtime_1.1.200.v20110505-0800.jar was not resolved. !SUBENTRY 2 org.eclipse.jdt.junit4.runtime 2 0 2011-12-16 13:00:35.206 !MESSAGE Missing required bundle org.junit_4.7.0. !SUBENTRY 1 org.eclipse.osgi 2 0 2011-12-16 13:00:35.207 !MESSAGE Bundle reference:file:/Users/stolz/ws-bucky/.metadata/.plugins/org.eclipse.pde.core/.bundle_pool/plugins/org.junit4_4.8.1.v20100525/ was not resolved. !SUBENTRY 2 org.junit4 2 0 2011-12-16 13:00:35.207 !MESSAGE Missing required bundle org.junit_4.8.1. </code></pre> <p>and</p> <pre><code>!SUBENTRY 1 org.eclipse.osgi 2 0 2011-12-16 13:00:35.234 !MESSAGE Bundle org.junit4_4.8.1.v20100525 [219] was not resolved. !SUBENTRY 2 org.junit4 2 0 2011-12-16 13:00:35.235 !MESSAGE Missing required bundle org.junit_4.8.1. !ENTRY org.eclipse.core.net 1 0 2011-12-16 13:00:39.889 !MESSAGE System property http.nonProxyHosts has been set to local|*.local|169.254/16|*.169.254/16 by an external source. This value will be overwritten using the values from the preferences Exception in thread "Plug-in Tests Runner" java.lang.IllegalArgumentException: Bundle "org.eclipse.jdt.junit4.runtime" not found. Possible causes include missing dependencies, too restrictive version ranges, or a non-matching required execution environment. at org.eclipse.pde.internal.junit.runtime.RemotePluginTestRunner.getClassLoader(RemotePluginTestRunner.java:77) at org.eclipse.pde.internal.junit.runtime.RemotePluginTestRunner.readPluginArgs(RemotePluginTestRunner.java:93) at org.eclipse.pde.internal.junit.runtime.RemotePluginTestRunner.init(RemotePluginTestRunner.java:83) at org.eclipse.pde.internal.junit.runtime.RemotePluginTestRunner.main(RemotePluginTestRunner.java:61) at org.eclipse.pde.internal.junit.runtime.PlatformUITestHarness$1.run(PlatformUITestHarness.java:47) at java.lang.Thread.run(Thread.java:680) </code></pre> <p>With the default JDT installation, the unit test runs fine, it's just that I want to define a proper target platform for a Hudson-build. Needless to say, I tried adding dependencies on the two offending platforms in various places, to no avail.</p> <p><strong>Update</strong>: Whoops, I confused this with another set of tests; these here are not headless but workbench-tests.</p> <p>Another oddity is that sometimes I won't see this error when running the test for the first time after switching to the default Eclipse platform and back to mine. Odd.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload