Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » RCP Testing Tool » Testing multiple AUTs from Maven
Testing multiple AUTs from Maven [message #1780309] Fri, 19 January 2018 18:12 Go to next message
Kev James is currently offline Kev JamesFriend
Messages: 22
Registered: November 2014
Junior Member
I've got a set of tests that I can run quite happily from inside Eclipse. I can also run them from Maven using the rcptt-maven-plugin. I'd now like to run the same set of tests across several versions of Eclipse (e.g. Mars, Neon, Oxygen) but I can't figure out how to configure the plugin to do this.

I have managed to configure multiple <aut> settings in my POM but only one environment gets tested.

Is there any way to achieve this?

Cheers,
KEv.
Re: Testing multiple AUTs from Maven [message #1780413 is a reply to message #1780309] Mon, 22 January 2018 09:40 Go to previous messageGo to next message
Viktoria Dlugopolskaya is currently offline Viktoria DlugopolskayaFriend
Messages: 124
Registered: March 2017
Senior Member
Hi Kev,

Try to specify few '<executions>' in your pom.xml with different configuration
Reference topic: https://stackoverflow.com/questions/34189795/how-to-execute-a-maven-plugin-twice-with-different-property
Re: Testing multiple AUTs from Maven [message #1780454 is a reply to message #1780413] Mon, 22 January 2018 16:04 Go to previous messageGo to next message
Kev James is currently offline Kev JamesFriend
Messages: 22
Registered: November 2014
Junior Member
Thanks Viktoria,
I tried that, my definition is like this:
			<plugin>
				<groupId>org.eclipse.rcptt</groupId>
				<artifactId>rcptt-maven-plugin</artifactId>
				<version>2.2.0</version>
				<extensions>true</extensions>
				<executions>
					<execution>
						<id>test-neon</id>
						<configuration>
							<aut>
								<explicit>E:\Eclipse-Test-Binaries\eclipse-jee-neon-3-win32-x86_64.zip</explicit>
								<injections>
									<injection>
  									<site>file:/<my generated repo></site>
  									<features>
  										<feature>my.feature.groupid</feature>
  									</features>
  								</injection>
  							</injections>
							</aut>
							<runner>
								<version>2.2.0</version>
								<vmArgs>
									<vmArg>-Xmx1024m</vmArg>
									<vmArg>-XX:MaxPermSize=256m</vmArg>
								</vmArgs>
							</runner>
						</configuration>
					</execution>
					<execution>
						<id>test-oxygen</id>
						<configuration>
							<aut>
								<explicit>E:\Eclipse-Test-Binaries\eclipse-jee-oxygen-1a-win32-x86_64.zip</explicit>
								<injections>
									<injection>
  									<site>file:/<my generated repo></site>
  									<features>
  										<feature>my.feature.groupid</feature>
  									</features>
  								</injection>
  							</injections>
							</aut>
							<runner>
								<version>2.2.0</version>
								<vmArgs>
									<vmArg>-Xmx1024m</vmArg>
									<vmArg>-XX:MaxPermSize=256m</vmArg>
								</vmArgs>
							</runner>
						</configuration>
					</execution>
				</executions>
			</plugin>


However, I get this message during build:
[ERROR] Failed to execute goal org.eclipse.rcptt:rcptt-maven-plugin:2.2.0:resources (default-resources) on project testing: The parameters 'aut' for goal org.eclipse.rcptt:rcptt-maven-plugin:2.2.0:resources are missing or invalid -> [Help 1]


As far as I can tell (referring to the link you shared) I've done this right; I didn't specify phase or goal since I didn't specify them in the original, single execution version. Plus, the error doesn't seem to relate to the phase; rather, it can't find the 'aut' element within the executions
Re: Testing multiple AUTs from Maven [message #1780599 is a reply to message #1780454] Wed, 24 January 2018 11:37 Go to previous messageGo to next message
Viktoria Dlugopolskaya is currently offline Viktoria DlugopolskayaFriend
Messages: 124
Registered: March 2017
Senior Member
Hi Kev,

This error is produced because maven runs default execution before two specified custom executions
You can open your pom.xml in Eclipse IDE and check 'Effective POM' tab to clearly understand how maven interprets a pom file.
Re: Testing multiple AUTs from Maven [message #1780649 is a reply to message #1780599] Thu, 25 January 2018 09:26 Go to previous messageGo to next message
Kev James is currently offline Kev JamesFriend
Messages: 22
Registered: November 2014
Junior Member
Thanks Viktoria,

I have done that and I can see that with just one <configuration> the default-{resources,package,execute} executions are generated in the effective POM, but with two <execution>s in my POM the effective pom is very different - three very basic executions
<execution>
            <id>default-resources</id>
            <phase>generate-resources</phase>
            <goals>
              <goal>resources</goal>
            </goals>
          </execution>
          <execution>
            <id>default-package</id>
            <phase>package</phase>
            <goals>
              <goal>package</goal>
            </goals>
          </execution>
          <execution>
            <id>default-execute</id>
            <phase>compile</phase>
            <goals>
              <goal>execute</goal>
            </goals>
          </execution>


and my two custom executions, so your explanation of my error is perfect.

I'm still at a loss as to how to get it to generate those three types of <execution> based on the two configurations I want to use. Do I have to manually generate the equivalent of the 'standard' effective POM for each configuration?
Re: Testing multiple AUTs from Maven [message #1782609 is a reply to message #1780649] Tue, 27 February 2018 06:52 Go to previous messageGo to next message
Viktoria Dlugopolskaya is currently offline Viktoria DlugopolskayaFriend
Messages: 124
Registered: March 2017
Senior Member
Try to name one of your executions as 'default-resources', so the default execution will be overridden
But I'm not sure it will work as you expect. Maybe it will be easier to run maven build few times with different profiles.
Re: Testing multiple AUTs from Maven [message #1793400 is a reply to message #1782609] Tue, 07 August 2018 14:24 Go to previous message
Kev James is currently offline Kev JamesFriend
Messages: 22
Registered: November 2014
Junior Member
I finally managed to figure out how to do this - basically you need to create a parent project of packaging type 'pom' and then duplicate the pom.xml in two subfolders, changing the settings for each execution environment:

<?xml version="1.0" encoding="UTF-8" standalone="no"?><project>
  <modelVersion>4.0.0</modelVersion>
  <artifactId>myartifact</artifactId>
  <version>0.0.1-SNAPSHOT</version>
  <packaging>pom</packaging>
  <modules>
    <module>uitesting-mars</module>
    <module>uitesting-neon</module>
  </modules>
  <pluginRepositories>
    <pluginRepository>
      <id>rcptt-snapshots</id>
      <name>RCPTT Maven Snapshots repository</name>
      <snapshots>
        <updatePolicy>always</updatePolicy>
      </snapshots>
      <url>https://repo.eclipse.org/content/repositories/rcptt-snapshots/</url>
    </pluginRepository>
    <pluginRepository>
      <id>rcptt-releases</id>
      <name>RCPTT Maven repository</name>
      <url>https://repo.eclipse.org/content/repositories/rcptt-releases/</url>
    </pluginRepository>
  </pluginRepositories>
</project>


then have folders uitesting-mars and uitesting-neon (in my case) with a pom.xml of packaging type rcpttest
Previous Topic:Bug with renaming Builder annotation
Next Topic:When does measure-time stop exactly?
Goto Forum:
  


Current Time: Fri Apr 19 01:19:47 GMT 2024

Powered by FUDForum. Page generated in 0.02586 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top