Questions tagged [tycho-surefire-plugin]

The Tycho plugin for Maven is able to execute Eclipse RCP test bundles within an OSGi environment.

Maven projects typically have separate test source directories in the same project. The Eclipse convention, however, is to have a separate test bundle (often a fragment of the host/target plugin with the suffix ".tests"). Tycho introduces a new eclipse-test-plugin packaging type to represent such projects. Build behavior is like regular Eclipse plugins, but these are treated specially at test-time.

The packaging type specified in the pom.xml of a test fragment should be eclipse-test-plugin, and the tycho-surefire-plugin will run them in the integration-test phase of the build.

Useful Links

Official Plugin Documentation

eclipse-test-plugin Packaging Type Reference

45 questions
1
vote
1 answer

tycho surefire with windowtester pro does not open correct window

I'm trying to set up a UI testing system with windowtester pro. I want to link those tests into the maven build process by using the Tycho plugin. For practising purpose I'm currently using an example project. Now, when I build my project everything…
0
votes
1 answer

How do I prevent the cleaning of the workspace used for Maven tycho surefire tests?

We have an Eclipse plugin and are using maven tycho to build it. I've now created a seperate project with unit tests and run those in the integration-test phase while building the plugin - all good. But to properly test the plugin it has to be used…
0
votes
1 answer

Unittesting pomless aspectJ project

In a Tycho build I have a pomless plugin-project/bundle A with some aspectj classes in it (*.aj). The project builds fine and another project B can reference project A via its manifest.mf. Now a separate unittest project C exists for testing…
0
votes
0 answers

Tycho Surefire cannot resolve Required Capabilities

We are building a huge set of eclipse bundles with many bundles being legacy. Surefire Tests do not run and always fail with the error: !SUBENTRY 2 com.my.plugin 2 0 2018-06-07 15:43:43.649 !MESSAGE Missing required capability Require-Capability:…
Bela Tamas Jozsa
  • 714
  • 5
  • 10
0
votes
1 answer

Adding Information To JUnit Test Results via tycho-surefire-plugin

The test results of JUnit tests have a properties tag with a bunch of properties. What is logged seems to be at the discretion of each executor of the tests. I want to process the XML files further, so it would be really nice to have the same keys…
Stefan S.
  • 3,950
  • 5
  • 25
  • 77
0
votes
1 answer

Passing arguments to dependency eclipse plugins when using mvn-tycho

I am trying to write unit test cases for an eclipse plugin. Went through http://www.vogella.com/tutorials/EclipseTycho/article.html#run-the-build-with-the-tests and created a eclipse-test-plugin. So, the test plugin (let's call is plugin-b) has a…
0
votes
1 answer

How to put Maven Tycho Dependency in my Eclipse Plug-in?

I've created a new project using tycho 0.26.0, it runs with Eclipse 4 Neon.2, so all modules are building successfully using maven, now I am trying to add a new dependency in my project, I have created a jar and I want to use it in my project, but I…
0
votes
1 answer

SurefireReflectionException

When running maven install, i get to following cryptic error message org.apache.maven.surefire.util.SurefireReflectionException: java.lang.reflect.InvocationTargetException; nested exception is java.lang.reflect.InvocationTargetException:…
Simon Eismann
  • 273
  • 1
  • 5
  • 17
0
votes
1 answer

How to enable/install the "compatibility layer" in Maven Tycho Surefire so that Platform.getPlugin() works

I have a test failure due to an IllegalStateException from Platform.getPlugin("...") which calls @Deprecated org.eclipse.core.runtime.Platform.getPluginRegistry() which "only works if the compatibility layer is installed and must not be used…
vorburger
  • 3,439
  • 32
  • 38
0
votes
1 answer

@RunWith(PowerMockRunner.class) do not work with tycho surefire

I currently want to run JUnits using PowerMockito on CI server using Tycho-Surefire (OSGi project). I prepared simple class: @RunWith(PowerMockRunner.class) public class SampleFirstTest { @Test public void addingTest() { assertEquals(10,…
P.Kurek
  • 71
  • 1
  • 4
0
votes
1 answer

Redeploy plugin into eclipse installation

I have a eclipse plugin that contains JUnit Tests developed using SWTBot. I'm trying to run the test against a eclipse installation using tycho-surefire-plugin on a hadless mode. Here is my maven conviguration:
L4zy
  • 327
  • 2
  • 13
0
votes
1 answer

SWTBot Restart rcp application in test

I'm having issues creating a SWTBot test that restarts rcp application. When I run a suite of tests from eclipse, when rcp app restarts it also restarts the suite. So the tests that already ran before the restart, will run again. I read that you can…
0
votes
1 answer

SWTBot: Error while running with tycho

We are writing SwtBot test cases for eclipse RCP application, it is working fine in eclipse. Now we are integrating test suite with existing tycho so that while creating product test case can also execute. Pom.xml created for SWTBot test suite is…
0
votes
0 answers

How to run unit tests by Maven Tycho Surfire with custom URL protocols (java.net.MalformedURLException: unknown protocol)

I have experience some difficulties to run JUnit test that needs to use custom URL handler declared as src/sun/net/www/protocol/exotic/Handler.java Tycho's surefire does some different execution of tests that result in failed tested. The exception…
Andrej
  • 558
  • 6
  • 14
0
votes
1 answer

SWTBOT switch workspace

I am using SWTBOT with tycho-surfire to test an eclipse application. The tests runs individually fine, but when I combine them I need to switch the workspace after each test, or specify somehow a specific workspace for each test. When I try to…
mazab
  • 1
  • 1
1 2
3