tycho-surefire:bnd-test

Full name:

org.eclipse.tycho:tycho-surefire-plugin:4.0.6:bnd-test

Description:

Execute tests using BND testing

Attributes:

  • Requires a Maven project to be executed.
  • Requires dependency resolution of artifacts in scope: test.
  • The goal is thread-safe and supports parallel builds.
  • Binds by default to the lifecycle phase: integration-test.

Required Parameters

Name Type Since Description
<reportDirectory> File - No description.
Default: ${project.build.directory}/failsafe-reports
<summaryFile> File - No description.
Default: ${project.build.directory}/failsafe-reports/failsafe-summary.xml
<testEngines> String - Configures the test engines to use, for example:
  • "junit-jupiter-engine" - if your test only contains JUnit5 tests
  • "junit-vintage-engine" - if your test only contains JUnit 3/4
  • ENGINE_JUPITER + "," + ENGINE_VINTAGE_ENGINE - if you want to use both engines

Default: junit-jupiter-engine,junit-vintage-engine

Optional Parameters

Name Type Since Description
<bundles> Set<String> - Configures additional bundles that should be included in the the test-setup, this could be required items to run the test or bundles that declare a Test-Cases header and contain the actual tests to run.
<deleteWorkDirAfterTest> boolean - If enabled, deletes the workarea after test execution
User Property: tycho.surefire.deleteWorkDir
<enableSecurity> boolean - No description.
<excludes> List<String> - List of patterns (separated by commas) used to specify the tests that should be excluded in testing. When not specified and when the test parameter is not specified, the default excludes will be **/*$* (which excludes all inner classes).
<failIfNoTests> boolean - If set to "false" the test execution will not fail in case there are no tests found.
Default: true
User Property: failIfNoTests
<includes> List<String> - List of patterns (separated by commas) used to specify the tests that should be included in testing. When not specified and when the test parameter is not specified, the default includes will be **/Test*.java **/*Test.java **/*Tests.java **/*TestCase.java
<keyStores> List<File> - No description.
<launchActivationEager> boolean - Always start bundles with eager activation policy
Default: false
User Property: tycho.bnd-test.eagerActivation
<packaging> String - No description.
Default: eclipse-plugin
User Property: tycho.bnd-test.packaging
<pluginArtifacts> List<Artifact> - No description.
User Property: plugin.artifacts
<policyFile> File - No description.
<printBundles> boolean - prints all loaded bundles
Default: false
User Property: tycho.printBundles
<printTests> boolean - No description.
Default: true
User Property: tycho.bnd-test.printTests
<properties> Map<String,String> - No description.
<runfw> String - Configure the run framework to use usually one of
  • "org.apache.felix.framework"
  • "org.eclipse.osgi"

Default: org.eclipse.osgi
<skip> Boolean - Same as skipTests
User Property: maven.test.skip
<skipTests> Boolean - Set this to "true" to skip running tests, but still compile them. Its use is NOT RECOMMENDED, but quite convenient on occasion. Default: false
User Property: skipTests
<summaryAppend> boolean - No description.
<test> String - Specify this parameter if you want to use the test pattern matching notation, Ant pattern matching, to select tests to run. The Ant pattern will be used to create an include pattern formatted like **/${test}.java When used, the includes and excludes patterns parameters are ignored
User Property: test
<testClass> String - Identifies a single test (suite) class to run. This is useful if you have a single JUnit test suite class defining which tests should be executed. Will be ignored if test is specified. Example:
<testClass>foo.bar.FooTest</testClass>

User Property: testClass
<testClassesDirectory> File - The directory containing generated test classes of the project being tested.
User Property: project.build.testOutputDirectory
<tester> String - Configure the tester to use usually one of
  • "biz.aQute.tester"
  • "biz.aQute.tester.junit-platform"

Default: biz.aQute.tester.junit-platform
<testerTrace> boolean - Enables tracing in the tester
Default: false
User Property: tycho.bnd-test.testerTrace
<trace> boolean - If set to true, tracing is enabled for bnd
Default: false
User Property: tycho.bnd-test.trace
<useJDK> ToolchainProvider$JDKUsage - Which JDK to use for executing tests. Possible values are: SYSTEM, BREE .

  • SYSTEM: Use the currently running JVM (or from toolchain if configured in pom.xml)
  • BREE: use MANIFEST header Bundle-RequiredExecutionEnvironment to lookup the JDK from toolchains.xml. The value of BREE will be matched against the id of the JDK toolchain elements in toolchains.xml. If the BREEs version is 9 or later and the ID did not match any element, the version of the BREE will be matched against the version of the JDK toolchain elements.
Example for BREE:
In META-INF/MANIFEST.MF:
Bundle-RequiredExecutionEnvironment: JavaSE-11
In toolchains.xml:
<toolchains>
  <toolchain>
     <type>jdk</type>
     <provides>
         <id>JavaSE-11</id>
         <version>11</version>
     </provides>
     <configuration>
        <jdkHome>/path/to/jdk/11</jdkHome>
     </configuration>
  </toolchain>
</toolchains>

Default: SYSTEM
<work> File - Root directory (osgi.install.area) of the Equinox runtime used to execute tests.
Default: ${project.build.directory}/work

Parameter Details

<bundles>

Configures additional bundles that should be included in the the test-setup, this could be required items to run the test or bundles that declare a Test-Cases header and contain the actual tests to run.
  • Type: java.util.Set<java.lang.String>
  • Required: report.plugin.goal.no

<deleteWorkDirAfterTest>

If enabled, deletes the workarea after test execution
  • Type: boolean
  • Required: report.plugin.goal.no
  • User Property: tycho.surefire.deleteWorkDir

<enableSecurity>

No description.
  • Type: boolean
  • Required: report.plugin.goal.no

<excludes>

List of patterns (separated by commas) used to specify the tests that should be excluded in testing. When not specified and when the test parameter is not specified, the default excludes will be **/*$* (which excludes all inner classes).
  • Type: java.util.List<java.lang.String>
  • Required: report.plugin.goal.no

<failIfNoTests>

If set to "false" the test execution will not fail in case there are no tests found.
  • Type: boolean
  • Required: report.plugin.goal.no
  • User Property: failIfNoTests
  • Default: true

<includes>

List of patterns (separated by commas) used to specify the tests that should be included in testing. When not specified and when the test parameter is not specified, the default includes will be **/Test*.java **/*Test.java **/*Tests.java **/*TestCase.java
  • Type: java.util.List<java.lang.String>
  • Required: report.plugin.goal.no

<keyStores>

No description.
  • Type: java.util.List<java.io.File>
  • Required: report.plugin.goal.no

<launchActivationEager>

Always start bundles with eager activation policy
  • Type: boolean
  • Required: report.plugin.goal.no
  • User Property: tycho.bnd-test.eagerActivation
  • Default: false

<packaging>

No description.
  • Type: java.lang.String
  • Required: report.plugin.goal.no
  • User Property: tycho.bnd-test.packaging
  • Default: eclipse-plugin

<pluginArtifacts>

No description.
  • Type: java.util.List<org.apache.maven.artifact.Artifact>
  • Required: report.plugin.goal.no
  • User Property: plugin.artifacts

<policyFile>

No description.
  • Type: java.io.File
  • Required: report.plugin.goal.no

<printBundles>

prints all loaded bundles
  • Type: boolean
  • Required: report.plugin.goal.no
  • User Property: tycho.printBundles
  • Default: false

<printTests>

No description.
  • Type: boolean
  • Required: report.plugin.goal.no
  • User Property: tycho.bnd-test.printTests
  • Default: true

<properties>

No description.
  • Type: java.util.Map<java.lang.String, java.lang.String>
  • Required: report.plugin.goal.no

<reportDirectory>

No description.
  • Type: java.io.File
  • Required: report.plugin.goal.yes
  • Default: ${project.build.directory}/failsafe-reports

<runfw>

Configure the run framework to use usually one of
  • "org.apache.felix.framework"
  • "org.eclipse.osgi"
  • Type: java.lang.String
  • Required: report.plugin.goal.no
  • Default: org.eclipse.osgi

<skip>

Same as skipTests
  • Type: java.lang.Boolean
  • Required: report.plugin.goal.no
  • User Property: maven.test.skip

<skipTests>

Set this to "true" to skip running tests, but still compile them. Its use is NOT RECOMMENDED, but quite convenient on occasion. Default: false
  • Type: java.lang.Boolean
  • Required: report.plugin.goal.no
  • User Property: skipTests

<summaryAppend>

No description.
  • Type: boolean
  • Required: report.plugin.goal.no

<summaryFile>

No description.
  • Type: java.io.File
  • Required: report.plugin.goal.yes
  • Default: ${project.build.directory}/failsafe-reports/failsafe-summary.xml

<test>

Specify this parameter if you want to use the test pattern matching notation, Ant pattern matching, to select tests to run. The Ant pattern will be used to create an include pattern formatted like **/${test}.java When used, the includes and excludes patterns parameters are ignored
  • Type: java.lang.String
  • Required: report.plugin.goal.no
  • User Property: test

<testClass>

Identifies a single test (suite) class to run. This is useful if you have a single JUnit test suite class defining which tests should be executed. Will be ignored if test is specified. Example:
<testClass>foo.bar.FooTest</testClass>
  • Type: java.lang.String
  • Required: report.plugin.goal.no
  • User Property: testClass

<testClassesDirectory>

The directory containing generated test classes of the project being tested.
  • Type: java.io.File
  • Required: report.plugin.goal.no
  • User Property: project.build.testOutputDirectory

<testEngines>

Configures the test engines to use, for example:
  • "junit-jupiter-engine" - if your test only contains JUnit5 tests
  • "junit-vintage-engine" - if your test only contains JUnit 3/4
  • ENGINE_JUPITER + "," + ENGINE_VINTAGE_ENGINE - if you want to use both engines
  • Type: java.lang.String
  • Required: report.plugin.goal.yes
  • Default: junit-jupiter-engine,junit-vintage-engine

<tester>

Configure the tester to use usually one of
  • "biz.aQute.tester"
  • "biz.aQute.tester.junit-platform"
  • Type: java.lang.String
  • Required: report.plugin.goal.no
  • Default: biz.aQute.tester.junit-platform

<testerTrace>

Enables tracing in the tester
  • Type: boolean
  • Required: report.plugin.goal.no
  • User Property: tycho.bnd-test.testerTrace
  • Default: false

<trace>

If set to true, tracing is enabled for bnd
  • Type: boolean
  • Required: report.plugin.goal.no
  • User Property: tycho.bnd-test.trace
  • Default: false

<useJDK>

Which JDK to use for executing tests. Possible values are: SYSTEM, BREE .

  • SYSTEM: Use the currently running JVM (or from toolchain if configured in pom.xml)
  • BREE: use MANIFEST header Bundle-RequiredExecutionEnvironment to lookup the JDK from toolchains.xml. The value of BREE will be matched against the id of the JDK toolchain elements in toolchains.xml. If the BREEs version is 9 or later and the ID did not match any element, the version of the BREE will be matched against the version of the JDK toolchain elements.
Example for BREE:
In META-INF/MANIFEST.MF:
Bundle-RequiredExecutionEnvironment: JavaSE-11
In toolchains.xml:
<toolchains>
  <toolchain>
     <type>jdk</type>
     <provides>
         <id>JavaSE-11</id>
         <version>11</version>
     </provides>
     <configuration>
        <jdkHome>/path/to/jdk/11</jdkHome>
     </configuration>
  </toolchain>
</toolchains>
  • Type: org.eclipse.tycho.core.maven.ToolchainProvider$JDKUsage
  • Required: report.plugin.goal.no
  • Default: SYSTEM

<work>

Root directory (osgi.install.area) of the Equinox runtime used to execute tests.
  • Type: java.io.File
  • Required: report.plugin.goal.no
  • Default: ${project.build.directory}/work