user2451418
user2451418

Reputation: 1397

How to test an application as JUnit-Plugin test in Eclipse

I am trying to set up a JUnit Plugin test for a RCP-Application. Thereby I am using Tycho (0.18), maven 3.0.2, eclipse INDIGO and JUnit4.

When I configure a Plugin Test, the to be tested application starts as expected, but the chosen test case does not run. Whereby I do not get any error or exception messages.

Because I did not find anything with google, I would be very happy if someone could provide some helpful information or tutorials.

Update: I have found this tutorial: How to JUnitPluginTests. But the UnitTests didn't start without any error message...

I have the assumption that the JUnit-Plugin-Test launcher does not work in a correct manner. Because I have to define my application separately in the arguments tab, else the following error appears:

Application "org.eclipse.pde.junit.runtime.nonuithreadtestapplication" could not be found in the registry

Upvotes: 1

Views: 3657

Answers (2)

wrgrs
wrgrs

Reputation: 2569

I had apparently the same problem. I tried a number of things, but what worked for me was:

  • Open the run configuration
  • Switch to the Main tab
  • Select 'Run an application'
  • Select '[No Application] - Headless mode'

I didn't need to run my product and this allowed the JUnit plug-in test runner to locate the unit tests.

Upvotes: 0

S. Cambon
S. Cambon

Reputation: 560

Have you checked Christian Pontesegger's tutorial on Tycho, which includes a post about tests?

Upvotes: 1

Related Questions