tycho-surefire:plugin-test
Full name:
org.eclipse.tycho:tycho-surefire-plugin:4.0.6:plugin-test
Description:
Executes integration-tests in an OSGi runtime.
The goal launches an OSGi runtime and executes the project's integration-tests (default patterns are PluginTest*.class, *IT.class
) in that runtime. The "test runtime" consists of the bundle built in this project and its transitive dependencies, plus some Equinox and test harness bundles. The bundles are resolved from the target platform of the project. Note that the test runtime does typically not contain the entire target platform. If there are implicitly required bundles (e.g. org.apache.felix.scr
to make declarative services work), they need to be added manually through an extraRequirements
configuration on the target-platform-configuration
plugin.
This goal adopts the maven-failsafe paradigm, that works in the following way:
pre-integration-test
phase could be used to prepare any prerequisite (e.g. starting a web-server, creating files, etc.)integration-test
phase does not fail the build if there are test failures but a summary file is writtenpost-integration-test
could be used to cleanup/tear down any resources from thepre-integration-test
phase- test outcome is checked in the
verify
phase that might fail the build if there are test failures
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 |
Optional Parameters
Name | Type | Since | Description |
---|---|---|---|
<appArgLine> |
String |
- |
Arbitrary applications arguments to set on the command line. |
<application> |
String |
- |
Eclipse application to be run. If not specified, default application org.eclipse.ui.ide.workbench will be used. Application runnable will be invoked from test harness, not directly from Eclipse. Note that you need to ensure that the bundle which defines the configured application is included in the test runtime. |
<argLine> |
String |
- |
Arbitrary JVM options to set on the command line. User Property: tycho.testArgLine |
<bundleStartLevel> |
BundleStartLevel[] |
- |
Bundle start level and auto start configuration used by the test runtime. Ignored if testRuntime is p2Installed . Example:
<bundleStartLevel> <bundle> <id>foo.bar.myplugin</id> <level>6</level> <autoStart>true</autoStart> </bundle> </bundleStartLevel> |
<classLoaderOrder> |
AbstractEclipseTestMojo$ClassLoaderOrder |
- |
The test runtime is configured with a composite class loader. This defines the order in which the loaders are searched, and it may need to be configured depending on the resolved classpath of the project.
Available values are:
booterFirst .Default: booterFirst |
<debugOptions> |
String |
- |
if set to a non-null value, the platform is put in debug mode. If the value is a non-empty string it is interpreted as the location of the .options file. This file indicates what debug points are available for a plug-in and whether or not they are enabled. for a list of available options see https://git.eclipse.org/c/equinox/rt.equinox.framework.git/plain/bundles/org.eclipse.osgi/.options User Property: osgi.debug |
<debugPort> |
int |
- |
Set this parameter to suspend the test JVM waiting for a client to open a remote debug session on the specified port. If further customization of JVM debug parameters is required then argLine can be used instead.User Property: debugPort |
<defaultStartLevel> |
BundleStartLevel |
- |
The default bundle start level and auto start configuration used by the test runtime for bundles where the start level/auto start is not configured in bundleStartLevel . Ignored if testRuntime is p2Installed . Example:
<defaultStartLevel> <level>6</level> <autoStart>true</autoStart> </defaultStartLevel> |
<deleteOsgiDataDirectory> |
boolean |
- |
Whether to recursively delete the directory osgiDataDirectory before running the tests.Default: true |
<deleteWorkDirAfterTest> |
boolean |
- |
If enabled, deletes the workarea after test execution User Property: tycho.surefire.deleteWorkDir |
<dependencies> |
Dependency[] |
- |
Additional dependencies to be added to the test runtime. Note: This parameter has only limited support for dependencies to artifacts within the reactor. Therefore it is recommended to specify extraRequirements on the target-platform-configuration plugin instead. Example:
<plugin> <groupId>org.eclipse.tycho</groupId> <artifactId>target-platform-configuration</artifactId> <version>${tycho-version}</version> <configuration> <dependency-resolution> <extraRequirements> <requirement> <type>eclipse-feature</type> <id>example.project.feature</id> <versionRange>0.0.0</versionRange> </requirement> </extraRequirements> </dependency-resolution> </configuration> </plugin>The dependencies specified as extraRequirements are – together with the dependencies specified in the MANIFEST.MF of the project – transitively resolved against the target platform. The resulting set of bundles is included in the test runtime. |
<enableAssertions> |
boolean |
1.5.0 |
By default, Tycho Surefire disables JVM assertions for the execution of your test cases. To enable the assertions, set this flag to "true". Default: false User Property: enableAssertions |
<environmentVariables> |
Map<String,String> |
- |
Additional environments to set for the forked test JVM. |
<excludedGroups> |
String |
- |
(junit47 provider with JUnit4.8+ only) Excluded groups/categories (comma-separated). Any methods/classes/etc with one of the groups/categories specified in this list will specifically not be run. For JUnit, this parameter forces the use of the junit47 provider User Property: excludedGroups |
<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). |
<explodedBundles> |
String[] |
- |
List of bundles that must be expanded in order to execute the tests. Ignored if testRuntime is p2Installed . |
<failIfNoTests> |
boolean |
- |
If set to "false" the test execution will not fail in case there are no tests found. Default: true User Property: failIfNoTests |
<forkedProcessTimeoutInSeconds> |
int |
- |
Kill the forked test process after a certain number of seconds. If set to 0, wait forever for the process, never timing out. User Property: surefire.timeout |
<frameworkExtensions> |
Dependency[] |
- |
List of framework extension bundles to add. Note: The goal does not automatically detect which bundles in the test runtime are framework extensions, but they have to be explicitly specified using this parameter. Ignored if testRuntime is p2Installed . |
<groups> |
String |
- |
(junit47 provider with JUnit4.8+ only) Groups/categories for this test (comma-separated). Only classes/methods/etc decorated with one of the group/category specified here will be included in test run, if specified. For JUnit, this parameter forces the use of the junit47 provider User Property: groups |
<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 |
<install> |
List<IU> |
- |
Additional root IUs to install, only relevant if testRuntime is p2Installed .
<install> <iu> <id>...</id> <version>...optional version...</id> <feature>true/false</feature> <!-- optional if true .feature.group is automatically added to the id --> </install> |
<installAllEnvironments> |
boolean |
- |
If testRuntime is p2Installed installs all configured environments |
<metadataDirectory> |
File |
- |
The directory where OSGi/PDE metadata files (e.g., MANIFEST.MF ) are located. Useful in case said metadata is changed at build time, using filtering.
Defaults to the project's base directory. Default: ${project.basedir} |
<osgiDataDirectory> |
File |
- |
OSGi data directory (osgi.instance.area , aka the workspace) of the Equinox runtime used to execute tests.Default: ${project.build.directory}/work/data/ |
<packaging> |
String |
- |
Configures the packaging type where this mojos applies Default: eclipse-plugin User Property: tycho.plugin-test.packaging |
<parallel> |
ParallelMode |
0.16.0 |
(JUnit 4.7 provider) Supports values "classes"/"methods"/"both" to run in separate threads, as controlled by threadCount. User Property: parallel |
<perCoreThreadCount> |
boolean |
0.16.0 |
(JUnit 4.7 provider) Indicates that threadCount is per cpu core. Default: true User Property: perCoreThreadCount |
<pluginArtifacts> |
List<Artifact> |
- |
No description. User Property: plugin.artifacts |
<printBundles> |
boolean |
- |
prints all loaded bundles Default: false User Property: tycho.printBundles |
<printWires> |
boolean |
- |
prints all loaded bundles Default: false User Property: tycho.printWires |
<product> |
String |
- |
Eclipse product to be run, i.e. -product parameter passed to test Eclipse runtime. |
<profileName> |
String |
0.19.0 |
p2 profile name of the installation under test. Only relevant if testRuntime is p2Installed . If tests are installed on top of an already existing installation in work , this must match the name of the existing profile.Default: DefaultProfile |
<providerHint> |
String |
0.16.0 |
Normally, Tycho will automatically determine the test framework provider based on the test project's classpath. This options forces the use of a test framework provider implementation with the given role hint. Tycho comes with providers such as "junit3","junit4","junit47","junit5", or "junit59". Note that when specifying a providerHint, you have to make sure the provider is actually available in the dependencies of tycho-surefire-plugin. |
<providerProperties> |
Properties |
0.16.0 |
Use this to specify surefire provider-specific properties. |
<reactorConcurrencyLevel> |
int |
- |
Configures the overall concurrency level. Important Note: If there are multiple mojo configurations this will choose the lowest configured number! So for example if in the same reactor there is one configuration with a concurrency level of 5 and one with a concurrency level of 3 then then only three parallel runs will be possible! |
<redirectTestOutputToFile> |
boolean |
- |
Set this to "true" to redirect the unit test standard output to a file (found in reportsDirectory/testName-output.txt). Default: false User Property: maven.test.redirectTestOutputToFile |
<repositories> |
List<Repository> |
- |
Additional repositories used to install units from, only relevant if testRuntime is p2Installed .
<repositories> <repository> <url>...another repository...</url> </repository> </repositories> |
<rerunFailingTestsCount> |
Integer |
- |
Flaky tests will re-run until they pass or the number of reruns has been exhausted. See surefire documentation for details.
Note: This feature is supported only for JUnit 4.x Default: 0 User Property: surefire.rerunFailingTestsCount |
<runOrder> |
String |
0.19.0 |
Defines the order the tests will be run in. Supported values are "alphabetical", "reversealphabetical", "random", "hourly" (alphabetical on even hours, reverse alphabetical on odd hours) and "filesystem". Default: filesystem |
<showEclipseLog> |
boolean |
- |
Enables -consolelog for the test OSGi runtime Default: false User Property: tycho.showEclipseLog |
<skip> |
Boolean |
- |
Same as skipTests User Property: maven.test.skip |
<skipAfterFailureCount> |
Integer |
- |
Skips the remaining tests after the Nth failure or error. See surefire documentation for details. Default: 0 User Property: surefire.skipAfterFailureCount |
<skipITs> |
boolean |
- |
No description. User Property: tycho.plugin-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 |
<suiteXmlFiles> |
List<String> |
- |
Only supported by the TestNG test provider. The values specified are passed to TestNG as test suite files. The suite files will overwrite the includes and excludes patterns. The path to the suite file(s) could be relative (test bundle classpath) or an absolute path to xml files outside the test bundle.
<configuration> <suiteXmlFiles> <suiteXmlFile>myTestSuite.xml</suiteXmlFile> </suiteXmlFiles> </configuration> |
<surefireProperties> |
File |
- |
No description. Default: ${project.build.directory}/surefire.properties |
<systemProperties> |
Map<String,String> |
- |
Additional system properties to set for the forked test JVM. |
<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 ignoredUser 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 |
<testRuntime> |
String |
0.19.0 |
How to create the OSGi test runtime. Allowed values are default and p2Installed . Mode p2Installed is EXPERIMENTAL - only works when installing products under test (see below).
<plugin> <groupId>org.eclipse.tycho</groupId> <artifactId>tycho-surefire-plugin</artifactId> <version>${tycho-version}</version> <configuration> <testRuntime>p2Installed</testRuntime> </configuration> </plugin> <plugin> <groupId>org.eclipse.tycho</groupId> <artifactId>target-platform-configuration</artifactId> <version>${tycho-version}</version> <configuration> <dependency-resolution> <extraRequirements> <!-- product IU under test --> <requirement> <type>p2-installable-unit</type> <id>example.product.id</id> <versionRange>0.0.0</versionRange> </requirement> </extraRequirements> </dependency-resolution> </configuration> </plugin> Default: default |
<threadCount> |
int |
0.16.0 |
(JUnit 4.7 provider) The attribute thread-count allows you to specify how many threads should be allocated for this execution. Only makes sense to use in conjunction with the parallel parameter. User Property: threadCount |
<trimStackTrace> |
boolean |
1.3.0 |
When true , stack traces are trimmed to only show lines within the test.Default: false User Property: trimStackTrace |
<useJDK> |
ToolchainProvider$JDKUsage |
- |
Which JDK to use for executing tests. Possible values are: SYSTEM , BREE .
In META-INF/MANIFEST.MF :
Bundle-RequiredExecutionEnvironment: JavaSE-11In 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 |
<useUIHarness> |
boolean |
- |
Run tests using UI (true) or headless (false) test harness. Default: false User Property: tycho.surefire.useUIHarness |
<useUIThread> |
boolean |
- |
Run tests in UI (true) or background (false) thread. Only applies to UI test harness. Default: true User Property: tycho.surefire.useUIThread |
<useUnlimitedThreads> |
boolean |
0.16.0 |
(JUnit 4.7 provider) Indicates that the thread pool will be unlimited. The parallel parameter and the actual number of classes/methods will decide. Setting this to "true" effectively disables perCoreThreadCount and threadCount. Default: false User Property: useUnlimitedThreads |
<work> |
File |
- |
Root directory (osgi.install.area) of the Equinox runtime used to execute tests. Default: ${project.build.directory}/work |
Parameter Details
<appArgLine>
- Type:
java.lang.String
- Required:
report.plugin.goal.no
<application>
- Type:
java.lang.String
- Required:
report.plugin.goal.no
<argLine>
- Type:
java.lang.String
- Required:
report.plugin.goal.no
- User Property:
tycho.testArgLine
<bundleStartLevel>
testRuntime
is p2Installed
. Example:
<bundleStartLevel> <bundle> <id>foo.bar.myplugin</id> <level>6</level> <autoStart>true</autoStart> </bundle> </bundleStartLevel>
- Type:
org.eclipse.sisu.equinox.launching.BundleStartLevel[]
- Required:
report.plugin.goal.no
<classLoaderOrder>
Available values are:
booterFirst
- the loader of the surefire booter (including bundled test platform) is searched firsttestProbeFirst
- the loader of the test class's plugin is searched first
booterFirst
.- Type:
org.eclipse.tycho.surefire.AbstractEclipseTestMojo$ClassLoaderOrder
- Required:
report.plugin.goal.no
- Default:
booterFirst
<debugOptions>
- Type:
java.lang.String
- Required:
report.plugin.goal.no
- User Property:
osgi.debug
<debugPort>
argLine
can be used instead.- Type:
int
- Required:
report.plugin.goal.no
- User Property:
debugPort
<defaultStartLevel>
bundleStartLevel
. Ignored if testRuntime
is p2Installed
. Example:
<defaultStartLevel> <level>6</level> <autoStart>true</autoStart> </defaultStartLevel>
- Type:
org.eclipse.sisu.equinox.launching.BundleStartLevel
- Required:
report.plugin.goal.no
<deleteOsgiDataDirectory>
osgiDataDirectory
before running the tests.- Type:
boolean
- Required:
report.plugin.goal.no
- Default:
true
<deleteWorkDirAfterTest>
- Type:
boolean
- Required:
report.plugin.goal.no
- User Property:
tycho.surefire.deleteWorkDir
<dependencies>
extraRequirements
on the target-platform-configuration
plugin instead. Example:
<plugin> <groupId>org.eclipse.tycho</groupId> <artifactId>target-platform-configuration</artifactId> <version>${tycho-version}</version> <configuration> <dependency-resolution> <extraRequirements> <requirement> <type>eclipse-feature</type> <id>example.project.feature</id> <versionRange>0.0.0</versionRange> </requirement> </extraRequirements> </dependency-resolution> </configuration> </plugin>The dependencies specified as
extraRequirements
are – together with the dependencies specified in the MANIFEST.MF
of the project – transitively resolved against the target platform. The resulting set of bundles is included in the test runtime.- Type:
org.apache.maven.model.Dependency[]
- Required:
report.plugin.goal.no
<enableAssertions>
- Type:
boolean
- Since:
1.5.0
- Required:
report.plugin.goal.no
- User Property:
enableAssertions
- Default:
false
<environmentVariables>
- Type:
java.util.Map<java.lang.String, java.lang.String>
- Required:
report.plugin.goal.no
<excludedGroups>
- Type:
java.lang.String
- Required:
report.plugin.goal.no
- User Property:
excludedGroups
<excludes>
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
<explodedBundles>
testRuntime
is p2Installed
.- Type:
java.lang.String[]
- Required:
report.plugin.goal.no
<failIfNoTests>
- Type:
boolean
- Required:
report.plugin.goal.no
- User Property:
failIfNoTests
- Default:
true
<forkedProcessTimeoutInSeconds>
- Type:
int
- Required:
report.plugin.goal.no
- User Property:
surefire.timeout
<frameworkExtensions>
testRuntime
is p2Installed
.- Type:
org.apache.maven.model.Dependency[]
- Required:
report.plugin.goal.no
<groups>
- Type:
java.lang.String
- Required:
report.plugin.goal.no
- User Property:
groups
<includes>
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
<install>
testRuntime
is p2Installed
.
<install> <iu> <id>...</id> <version>...optional version...</id> <feature>true/false</feature> <!-- optional if true .feature.group is automatically added to the id --> </install>
- Type:
java.util.List<org.eclipse.tycho.surefire.IU>
- Required:
report.plugin.goal.no
<installAllEnvironments>
testRuntime
is p2Installed
installs all configured environments- Type:
boolean
- Required:
report.plugin.goal.no
<metadataDirectory>
MANIFEST.MF
) are located. Useful in case said metadata is changed at build time, using filtering.
Defaults to the project's base directory.
- Type:
java.io.File
- Required:
report.plugin.goal.no
- Default:
${project.basedir}
<osgiDataDirectory>
osgi.instance.area
, aka the workspace) of the Equinox runtime used to execute tests.- Type:
java.io.File
- Required:
report.plugin.goal.no
- Default:
${project.build.directory}/work/data/
<packaging>
- Type:
java.lang.String
- Required:
report.plugin.goal.no
- User Property:
tycho.plugin-test.packaging
- Default:
eclipse-plugin
<parallel>
- Type:
org.eclipse.tycho.surefire.ParallelMode
- Since:
0.16.0
- Required:
report.plugin.goal.no
- User Property:
parallel
<perCoreThreadCount>
- Type:
boolean
- Since:
0.16.0
- Required:
report.plugin.goal.no
- User Property:
perCoreThreadCount
- Default:
true
<pluginArtifacts>
- Type:
java.util.List<org.apache.maven.artifact.Artifact>
- Required:
report.plugin.goal.no
- User Property:
plugin.artifacts
<printBundles>
- Type:
boolean
- Required:
report.plugin.goal.no
- User Property:
tycho.printBundles
- Default:
false
<printWires>
- Type:
boolean
- Required:
report.plugin.goal.no
- User Property:
tycho.printWires
- Default:
false
<product>
- Type:
java.lang.String
- Required:
report.plugin.goal.no
<profileName>
testRuntime
is p2Installed
. If tests are installed on top of an already existing installation in work
, this must match the name of the existing profile.- Type:
java.lang.String
- Since:
0.19.0
- Required:
report.plugin.goal.no
- Default:
DefaultProfile
<providerHint>
- Type:
java.lang.String
- Since:
0.16.0
- Required:
report.plugin.goal.no
<providerProperties>
- Type:
java.util.Properties
- Since:
0.16.0
- Required:
report.plugin.goal.no
<reactorConcurrencyLevel>
- Type:
int
- Required:
report.plugin.goal.no
<redirectTestOutputToFile>
- Type:
boolean
- Required:
report.plugin.goal.no
- User Property:
maven.test.redirectTestOutputToFile
- Default:
false
<reportDirectory>
- Type:
java.io.File
- Required:
report.plugin.goal.yes
- Default:
${project.build.directory}/failsafe-reports
<repositories>
testRuntime
is p2Installed
.
<repositories> <repository> <url>...another repository...</url> </repository> </repositories>
- Type:
java.util.List<org.apache.maven.model.Repository>
- Required:
report.plugin.goal.no
<rerunFailingTestsCount>
Note: This feature is supported only for JUnit 4.x
- Type:
java.lang.Integer
- Required:
report.plugin.goal.no
- User Property:
surefire.rerunFailingTestsCount
- Default:
0
<runOrder>
- Type:
java.lang.String
- Since:
0.19.0
- Required:
report.plugin.goal.no
- Default:
filesystem
<showEclipseLog>
- Type:
boolean
- Required:
report.plugin.goal.no
- User Property:
tycho.showEclipseLog
- Default:
false
<skip>
skipTests
- Type:
java.lang.Boolean
- Required:
report.plugin.goal.no
- User Property:
maven.test.skip
<skipAfterFailureCount>
- Type:
java.lang.Integer
- Required:
report.plugin.goal.no
- User Property:
surefire.skipAfterFailureCount
- Default:
0
<skipITs>
- Type:
boolean
- Required:
report.plugin.goal.no
- User Property:
tycho.plugin-test.skip
<skipTests>
false
- Type:
java.lang.Boolean
- Required:
report.plugin.goal.no
- User Property:
skipTests
<suiteXmlFiles>
includes
and excludes
patterns. The path to the suite file(s) could be relative (test bundle classpath) or an absolute path to xml files outside the test bundle.
<configuration> <suiteXmlFiles> <suiteXmlFile>myTestSuite.xml</suiteXmlFile> </suiteXmlFiles> </configuration>
- Type:
java.util.List<java.lang.String>
- Required:
report.plugin.goal.no
<summaryFile>
- Type:
java.io.File
- Required:
report.plugin.goal.yes
- Default:
${project.build.directory}/failsafe-reports/failsafe-summary.xml
<surefireProperties>
- Type:
java.io.File
- Required:
report.plugin.goal.no
- Default:
${project.build.directory}/surefire.properties
<systemProperties>
- Type:
java.util.Map<java.lang.String, java.lang.String>
- Required:
report.plugin.goal.no
<test>
**/${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>
test
is specified. Example:
<testClass>foo.bar.FooTest</testClass>
- Type:
java.lang.String
- Required:
report.plugin.goal.no
- User Property:
testClass
<testClassesDirectory>
- Type:
java.io.File
- Required:
report.plugin.goal.no
- User Property:
project.build.testOutputDirectory
<testRuntime>
default
and p2Installed
. Mode p2Installed
is EXPERIMENTAL - only works when installing products under test (see below).
- In
default
mode, all necessary files to define the test runtime likeconfig.ini
are generated by tycho. This installation mode has the advantage that the test runtime is minimal (defined by the transitive dependencies of the test bundle plus and the test harness) and existing bundle jars are referenced rather than copied for the installation - In
p2Installed
mode, use p2 director to install test bundle, test harness bundles and respective dependencies. This installation mode can be used for integration tests that require a fully p2-provisioned installation. To install a product IU, add it as extra requirement to the test bundle (see example below). Note that this installation mode comes with a certain performance overhead for executing the provisioning operations otherwise not required.
<plugin> <groupId>org.eclipse.tycho</groupId> <artifactId>tycho-surefire-plugin</artifactId> <version>${tycho-version}</version> <configuration> <testRuntime>p2Installed</testRuntime> </configuration> </plugin> <plugin> <groupId>org.eclipse.tycho</groupId> <artifactId>target-platform-configuration</artifactId> <version>${tycho-version}</version> <configuration> <dependency-resolution> <extraRequirements> <!-- product IU under test --> <requirement> <type>p2-installable-unit</type> <id>example.product.id</id> <versionRange>0.0.0</versionRange> </requirement> </extraRequirements> </dependency-resolution> </configuration> </plugin>
- Type:
java.lang.String
- Since:
0.19.0
- Required:
report.plugin.goal.no
- Default:
default
<threadCount>
- Type:
int
- Since:
0.16.0
- Required:
report.plugin.goal.no
- User Property:
threadCount
<trimStackTrace>
true
, stack traces are trimmed to only show lines within the test.- Type:
boolean
- Since:
1.3.0
- Required:
report.plugin.goal.no
- User Property:
trimStackTrace
- Default:
false
<useJDK>
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 intoolchains.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.
In
META-INF/MANIFEST.MF
:
Bundle-RequiredExecutionEnvironment: JavaSE-11In 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
<useUIHarness>
- Type:
boolean
- Required:
report.plugin.goal.no
- User Property:
tycho.surefire.useUIHarness
- Default:
false
<useUIThread>
- Type:
boolean
- Required:
report.plugin.goal.no
- User Property:
tycho.surefire.useUIThread
- Default:
true
<useUnlimitedThreads>
- Type:
boolean
- Since:
0.16.0
- Required:
report.plugin.goal.no
- User Property:
useUnlimitedThreads
- Default:
false
<work>
- Type:
java.io.File
- Required:
report.plugin.goal.no
- Default:
${project.build.directory}/work