Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » RCP Testing Tool » Running Single Test(s) with Maven
Running Single Test(s) with Maven [message #1729441] Thu, 14 April 2016 08:26 Go to next message
Marcus Höpfner is currently offline Marcus HöpfnerFriend
Messages: 56
Registered: February 2014
Member
Hi,

is it possible to run a single Test via Maven?

I tried
<build>
	<plugins>
		<plugin>
			<groupId>org.eclipse.rcptt</groupId>
			<artifactId>rcptt-maven-plugin</artifactId>
			<version>${rcptt-maven-version}</version>
			<extensions>true</extensions>
			<configuration>
				<tests>
					<test>AAAAA_FirstTestCase</test>
				</tests>
			</configuration>
		</plugin>
	</plugins>
</build>


But it does not work?
Re: Running Single Test(s) with Maven [message #1730072 is a reply to message #1729441] Thu, 21 April 2016 09:21 Go to previous messageGo to next message
Andrey Sobolev is currently offline Andrey SobolevFriend
Messages: 75
Registered: February 2015
Member
Hi,

If you need to execute just one test to be sure all is running we have a undocumented parameter limit.

<configuration>
   <limit>2</limit>
</configuration>


Otherwise the only way is to create as test suite and put test inside it.

<configuration
  <suites>
    <suite>MyTestSuite</suite>
  </suites>
</configuration>


Best regards,
Andrey.
Re: Running Single Test(s) with Maven [message #1730480 is a reply to message #1730072] Tue, 26 April 2016 08:43 Go to previous messageGo to next message
Marcus Höpfner is currently offline Marcus HöpfnerFriend
Messages: 56
Registered: February 2014
Member
I would like to start certain tests, not just the first one or first two.

The use case: We have about 200 tests which run about 2 hours. This is done by Jenkins during night. If a test fails we want to execute just this test or maybe also the adjacent.
So I actually need a second build where I can pass the Tests I want to execute. But since there is no option in maven/pom.xml for single tests I found another solution:

I have created another build job for that which consists of two steps:
1: mvn clean generate-resources
2: a groovy script which starts the rcptt runner more or less like it was done by mvn clean package
The groovy script parses the pom xml and starts the runner with the parameters from pom.xml (like execution time, vmargs). It adds the "-tests test1.test;test2.test" option and passes the tests which are given as parameters in the build.
With this I can execute single or mutliple tests without loosing the configuration from pom.xml.
Re: Running Single Test(s) with Maven [message #1731005 is a reply to message #1730480] Mon, 02 May 2016 06:23 Go to previous messageGo to next message
Andrey Sobolev is currently offline Andrey SobolevFriend
Messages: 75
Registered: February 2015
Member
Hi,

Missed we already have this functionality in runner:-), Thanks.
I've pushed a fix for maven plugin to pass <tests> section arguments to runner so in next 2.1-SNAPHOT maven plugin it will be available.

Best regards,
Andrey.
Re: Running Single Test(s) with Maven [message #1735711 is a reply to message #1731005] Wed, 22 June 2016 08:14 Go to previous message
Angelo Luciani is currently offline Angelo LucianiFriend
Messages: 129
Registered: September 2015
Location: Milan
Senior Member

Please take a look to https://www.eclipse.org/forums/index.php/t/1071856/ and https://www.eclipse.org/forums/index.php/m/1713726/#msg_1713726.

"Ce sont les petits désirs qui rendent un jeune homme hardi."
Giovanni Giacomo Casanova
Previous Topic:Concat a list of strings
Next Topic:ECL: Double click on TreeItem cell
Goto Forum:
  


Current Time: Thu Jul 25 16:29:23 GMT 2024

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

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

Back to the top