开发者

Headless integration tests of an eclipse plugin with maven tycho

I wrote some Junit tests for my eclipse plugin. If I start my test suite as a "JUnit Plug-in Test" from Eclipse, everything is working fine. N开发者_运维百科ow I want to run them from Maven Tycho.

So I put the following packaging : "eclipse-test-plugin", in the pom.xml and the integration tests start with a "mvn clean integration-test". So I think my maven configuration is quite OK.

But some tests are failing, and I suspect the headless build can't detect the IMarkers my tests are trying to detect, since IMarkers are UI components.

Am I right? Any idea to get my tests based on IMarkers running with Tycho?


You need to tell test plugin that you want to run the test with a UI, by default it will run with the headless runner.

<plugin>
  <groupId>org.eclipse.tycho</groupId>
  <artifactId>tycho-surefire-plugin</artifactId>
  <configuration>
    <useUIHarness>true</useUIHarness>
    <useUIThread>true</useUIThread>
  </configuration>
</plugin>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜