Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Difference between revisions of "Tycho/Release Notes/0.26"
Line 87: | Line 87: | ||
</build> | </build> | ||
+ | === New option to check consistency of .target files === | ||
+ | |||
+ | The [https://www.eclipse.org/tycho/sitedocs-extras/target-platform-validation-plugin/plugin-info.html target-platform-validation-plugin] now features a new option flag <tt>checkProvisioning</tt> which will evaluate whether the content of the .target file can be provisioned all together. It checks for dependencies availability, non-conflicting versions of included installation units, and all kinds of errors usually reported by p2 director. | ||
[[Category:Tycho|Release Notes/0.26]] | [[Category:Tycho|Release Notes/0.26]] |
Revision as of 04:29, 25 July 2016
Contents
SNAPSHOT builds
Tycho 0.26.0 is currently in development. To try out the most recent snapshot build of 0.26.0, simply add the following snippet to your (parent) pom.xml or settings.xml, and set the property for the Tycho version (e.g. tycho-version) to 0.26.0-SNAPSHOT.
<pluginRepositories> <pluginRepository> <id>tycho-snapshots</id> <url>https://repo.eclipse.org/content/repositories/tycho-snapshots/</url> </pluginRepository> </pluginRepositories>
SNAPSHOT site docs
Refer to the latest SNAPSHOT site docs for Tycho and Tycho Extras.
New and Noteworthy
Complete list of bug fixes and enhancements in 0.26.0
TestNG support
The Tycho Surefire Plug-in does now support running tests with the TestNG framework. In order to use TestNG you have to:
Provide TestNG as OSGi Bundle
Because TestNG is not an OSGi Bundle, you have to provide the TestNG classes and it's dependencies (currently only com.beust.jcommander) as OSGi bundles by either include the jars into your test plugin and export the TestNG java packages so that the Tycho Surefire Plugin can see them or create a separate Eclipse Plug-in ("Plug-in from Existing JAR Archives" Wizard) that contains the jars. Make sure the TestNG java packages are exported. Add this newly created Plug-in as a dependency to all your Test Plug-ins /Fragments.
Configure Tycho Surefire Plug-in
The TestNG framework provider has to be enabled by setting the <providerHint> configuration value to "testng". Within TestNG tests it is common to use java assertions, so you might also have to enable assertions. Example configuration:
<build> <plugin> <groupId>org.eclipse.tycho</groupId> <artifactId>tycho-surefire-plugin</artifactId> <version>${tycho.version}</version> <configuration> <providerHint>testng</providerHint> <argLine>-ea</argLine> </configuration> </plugin> </build>
Using Test Suites
If you want to use test suites you could configure the suite files you want to execute by specifing the suite xml files within the configuration:
<build> <plugin> <groupId>org.eclipse.tycho</groupId> <artifactId>tycho-surefire-plugin</artifactId> <version>${tycho.version}</version> <configuration> <providerHint>testng</providerHint> <argLine>-ea</argLine> <suiteXmlFiles> <suiteXmlFile>mysuite1.xml</suiteXmlFile> <suiteXmlFile>mysuite2.xml</suiteXmlFile> </suiteXmlFiles> </configuration> </plugin> </build>
Using Groups
If you want to use groups within your TestNG tests, you have to configure one additional thing. Because of the way TestNG and the Surefire TestNG Plug-in do select the test groups that should be executed, the Plug-in that exports the org.testng packages must be able to load a class from the Surefire TestNG Plug-in. With the OSGi Classloader this is only possible if you dynamically import that package in the plugin you export the TestNG packages. Within the MANIFEST.MF file of that Plug-in add
DynamicImport-Package: org.apache.maven.surefire.testng.utils
To execute specific groups you could add the group names within the plugin configuration
<build> <plugin> <groupId>org.eclipse.tycho</groupId> <artifactId>tycho-surefire-plugin</artifactId> <version>${tycho.version}</version> <configuration> <providerHint>testng</providerHint> <argLine>-ea</argLine> <groups>myGroup1,myGroup2</groups> </configuration> </plugin> </build>
New option to check consistency of .target files
The target-platform-validation-plugin now features a new option flag checkProvisioning which will evaluate whether the content of the .target file can be provisioned all together. It checks for dependencies availability, non-conflicting versions of included installation units, and all kinds of errors usually reported by p2 director.