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
11
votes
1 answer

Which dependencies do I need to use Mockito and JUnit in an Eclipse RCP Tycho project

This is my current test fragment: eclipse-test-plugin org.junit com.springsource.org.junit 4.7.0
oers
  • 18,436
  • 13
  • 66
  • 75
9
votes
2 answers

How can I debug test cases run by Tycho?

When using Tycho to build a project, the test cases are run in a new process using the equinox launcher to run -application org.eclipse.tycho.surefire.osgibooter.headlesstest. How can I debug the test cases?
Aaron Digulla
  • 321,842
  • 108
  • 597
  • 820
7
votes
1 answer

Is it possible to configure tycho-surefire to run in the test phase?

I haven't done a lot with Maven, but I understand the basics. We're using Tycho to build RCP plugins and I'm wondering why Tycho uses the integration-test phase to execute the tests in a bundle. Is it possible to bind some types of tests to the…
Byebye
  • 934
  • 7
  • 24
7
votes
1 answer

Run a single plug-in test method using tycho-surefire-plugin

How can I run a single plug-in test method in Maven using tycho-surefire-plugin? I tried the -Dtest option with #, but it doesn't work: mvn clean install -Dtest=MyUITest#testDummy Is there something I am missing?
6
votes
1 answer

OSGi-bundles not activating when run by Tycho surefire

I have several OSGi bundles that are built in Eclipse using normal manifest-managed dependencies and external builds with Maven Tycho. Running the bundles inside of Eclipse on Equinox works fine. Building them with Tycho works fine. Now I want to…
sina
  • 1,817
  • 1
  • 18
  • 42
5
votes
2 answers

Tycho cannot resolve dependency configured in tycho-surefire-plugin

I'm working on an Eclipse RCP + Maven project for the first time and I want to run some unit tests on my bundles with JUnit. It seems that the most recommended approach is to create a bundle fragment and use something like Tycho plugin to resolve…
Fappaz
  • 3,033
  • 3
  • 28
  • 39
4
votes
0 answers

Eclipse RCP plugin code coverage with Jacoco and Tycho surefire

I have an Eclipse RCP application that is built via Maven using Tycho. It has some tests that are located in plugin fragments, so each plugin with operational code has its own fragment with the tests inside. The tests are executed during the maven…
Cecilya
  • 519
  • 1
  • 5
  • 20
3
votes
1 answer

Can't execute goal org.eclipse.tycho:tycho-surefire-plugin:2.0.0:test (default-test) after switching to Java11

I'm trying to switch our legacy eclipse-plugin-based multi-modules project to Java-11, and made almost everything, except the "eclipse-test-plugin" projects. All of them throw a similar error WARNING: An illegal reflective access operation has…
Andrqxa
  • 87
  • 1
  • 9
3
votes
2 answers

Using slf4j from the Eclipse Orbit in tests with Tycho Surefire

I am currently trying to set up a logging facility in our Eclipse based product using SLF4J as bundles out of the Eclipse Orbit project. I use in detail: org.slf4j.api ch.qos.logback.classic ch.qos.logback.core ch.qos.logback.slf4j When I try to…
Lars
  • 81
  • 1
  • 6
2
votes
0 answers

Encoding issues using tycho surefire plugin

I've been turning my head around with this issue and cannot find an explanation for what is happening here. I'm using tycho surefire plugin to build a set of eclipse plugins and execute some unit tests. Here's the environment: tycho-surefire-plugin:…
2
votes
0 answers

Visibility of plain jar in tycho-surefire-plugin

The problem I am faced with the following scenario: The sources of an Eclipse test plugin (tycho packaging type eclipse-test-plugin) depend on a "plain" jar (read: non-OSGi jar). I managed to get the tests to compile and run in Eclipse, however when…
Kirtchev
  • 21
  • 2
2
votes
1 answer

additional bundles for tycho surefire

My tycho surefire test application requires more bundles than which are automatically added through tycho dependency handling. I could add all bundles as Require-Bundle in the MANIFEST.MF of the test bundle, but this seems like not a very clean…
2
votes
2 answers

Test Bundle cannot find the Bundle to be tested

I have configured an std project setup for tycho projects. build works very well: [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary: [INFO] [INFO] root ..................................…
Bela Tamas Jozsa
  • 714
  • 5
  • 10
2
votes
0 answers

Attempts to read artifacts failed

I am creating an eclipse plugin and building it with Maven 3.5.0. During the execution of the mvn -T 8 clean install I get some warnings: [WARNING] Some attempts to read artifact osgi.bundle,org.eclipse.jdt.debug,3.9.1 .v20160128-1343…
John Doe
  • 1,058
  • 8
  • 30
2
votes
0 answers

How to test OSGi declarative services using JUnit and tycho-surefire-plugin?

Tried to test an OSGi service using JUnit and the tycho-surefire-plugin. Configuration of the plugin org.eclipse.tycho tycho-surefire-plugin
leftbit
  • 848
  • 1
  • 7
  • 18
1
2 3