Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Problem running junit plugin tests with CDT parent pom: No tests found

My guess is that you don't have a class called AutomatedIntegrationSuite in your test plug-in. This is not a requirement, but rather the CDT default as defined in the root pom.xml (which overrides the default default in surefire). If you want to have custom surefire configuration you need to provide your own settings in your pom.xml - specifically the tycho-surefire-plugin/configuration/includes/, see

For example, when I recently added TM.terminal to CDT's build I created a new class:

The default is defined in root pom: and by placing a file in the root of the bundle, you can use other pre-canned defaults (eg. UI testing:

However, if the defaults don't work for you, the pom.xml needs to be written, for example DSF-GDB tests have their own unique settings:

I have answered some other questions inline to your email below.

On Mon, 10 Feb 2020 at 14:58, 15 knots <fifteenknots505@xxxxxxxxx> wrote:

I'm currently trying to build some of my plugins with the CDT parent pom.
excerpt from the build log

[INFO] --- tycho-surefire-plugin:1.6.0:test (default-test) @ ---
[INFO] Expected eclipse log file:
[INFO] Command line:
-Dosgi.noShutdown=false, -Dosgi.os=linux,,
-Dosgi.arch=x86_64, -javaagent:/home/15knots/.cache.
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[ERROR] Failed to execute goal
org.eclipse.tycho:tycho-surefire-plugin:1.6.0:test (default-test) on
project No tests found. -> [Help

In the metadate/.log I see the following

BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=de_DE
Framework arguments:  -application
org.eclipse.tycho.surefire.osgibooter.headlesstest -testproperties
-product org.eclipse.platform.ide -pluginCustomization
Command-line arguments:  -data
-application org.eclipse.tycho.surefire.osgibooter.headlesstest
-product org.eclipse.platform.ide -pluginCustomization

!ENTRY 4 0 2020-02-10 20:36:27.118
!MESSAGE FrameworkEvent ERROR
org.osgi.framework.BundleException: Could not resolve module: [225]
  Unresolved requirement: Require-Capability: eclipse.platform;

Why does eclipse require the win32 stuff?

Eclipse doesn't exactly require it - something in the target platform is causing Tycho to add to the set of bundles included when launching, but then it is unresolved because of the platform difference. This could be a tycho issue or an issue in CDT's target platform. However I don't really understand the issue, but I do know it can be ignored.
Could that be the problem?



Originally, all tests ran fine with the /maven/-surefire-plugin. Now
CDt runs them with the /tycho/-maven-plugin. Do I need to tweak my

My guess is that you have unit tests that can run with maven surefire as they can run without OSGi (aka they can run as JUnit Tests and don't need to be run as JUnit Plug-in Tests)? The tycho extension to surefire understands OSGi and can launch accordingly. However the tycho tests are bound to the verify phase of maven, not test phase. 

When running maven with debug output, I can the that the test classes
are at the location wher surefire expects them:

I am not sure which line indicates that. The line that says "includes = " shows what pattern surefire is looking for (as mentioned above)

[INFO] --- tycho-surefire-plugin:1.6.0:test (default-test) @ ---
[DEBUG] Configuring mojo
org.eclipse.tycho:tycho-surefire-plugin:1.6.0:test from plugin realm
parent: sun.misc.Launcher$AppClassLoader@70dea4e]
[DEBUG] Configuring mojo
'org.eclipse.tycho:tycho-surefire-plugin:1.6.0:test' with basic
configurator -->
[DEBUG]   (f) appArgLine = -pluginCustomization
[DEBUG]   (f) argLine =
-Xms256m -Xmx512m -ea
[DEBUG]   (f) deleteOsgiDataDirectory = true
[DEBUG]   (s) type = p2-installable-unit
[DEBUG]   (s) artifactId =
[DEBUG]   (f) dependencies = [Dependency {groupId=null,, version=null,
[DEBUG]   (f) enableAssertions = false
[DEBUG]   (f) failIfNoTests = true
[DEBUG]   (f) includes = [**/AutomatedIntegrationSuite.*]
[DEBUG]   (f) osgiDataDirectory =
[DEBUG]   (f) perCoreThreadCount = true
[DEBUG]   (f) pluginArtifacts = ...
[DEBUG]   (f) product = org.eclipse.platform.ide
[DEBUG]   (f) profileName = DefaultProfile
[DEBUG]   (f) project = MavenProject: @
[DEBUG]   (f) redirectTestOutputToFile = false
[DEBUG]   (f) reportsDirectory =
[DEBUG]   (f) rerunFailingTestsCount = 0
[DEBUG]   (f) runOrder = filesystem
[DEBUG]   (f) session = org.apache.maven.execution.MavenSession@2e46ffd5
[DEBUG]   (f) showEclipseLog = false
[DEBUG]   (f) skipAfterFailureCount = 0
[DEBUG]   (f) surefireProperties =
[DEBUG]   (f) testClassesDirectory =

Any hints?

I hope the above resolves your questions.

As for the probable follow-on question, I don't know why it is like it is, but probably because of JUnit3 history when everything was defined as suites. I would be fine making the change across the board with new defaults. Indeed in many ways it would be an improvement as it can be easy to forget to add new tests to the suite.

cdt-dev mailing list
To change your delivery options, retrieve your password, or unsubscribe from this list, visit

Back to the top