Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-dev] Why is "HeadlessTestApplication" launched as a singleton

How do you run eclipse applications from within junit tests?

--
Regards,
Igor

On 12-09-17 12:30 PM, Tom Schindl wrote:
Hi,

I'm trying to run an Equinox-OSGi-Application as an automated test
through PDE and through maven-tycho:

In PDE I launch the test suite using
org.eclipse.pde.junit.runtime.coretestapplication which is defined like
this:

    <extension
          id="coretestapplication"
          point="org.eclipse.core.runtime.applications">
       <application
             visible="false">
          <run
                class="org.eclipse.pde.internal.junit.runtime.CoreTestApplication">
          </run>
       </application>
    </extension>

which means I can launch inside my JUnit-Test my own OSGi-Application
when I run inside the eclipse IDE through the PDE-Junit-Plugin.

In contrast when running in maven, I launch the
org.eclipse.tycho.surefire.osgibooter.headlesstest which is defined like
this:

<extension
          id="headlesstest"
          point="org.eclipse.core.runtime.applications">
       <application
             cardinality="singleton-global"
             thread="main"
             visible="true">
          <run
                class="org.eclipse.tycho.surefire.osgibooter.HeadlessTestApplication">
          </run>
       </application>
    </extension>

which does not allow me to bring up another OSGi-Application. Is there a
reason you made the headlesstest a "singleton-global" or asked the other
way round: Are you open to change this?

Tom



Back to the top