You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Tibor Digana (Jira)" <ji...@apache.org> on 2020/02/17 17:23:00 UTC

[jira] [Commented] (SUREFIRE-1752) Implement new value for the "parallel" config element (e.g. "categories")

    [ https://issues.apache.org/jira/browse/SUREFIRE-1752?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17038526#comment-17038526 ] 

Tibor Digana commented on SUREFIRE-1752:
----------------------------------------

Essentially you want to make the annotation @Category parallel?
The logic behind this annotation is complex because there is also the inheritance of annotations, and there has to be considered the annottaion on the method too.
How would you like to have it working?

> Implement new value for the "parallel" config element (e.g. "categories")
> -------------------------------------------------------------------------
>
>                 Key: SUREFIRE-1752
>                 URL: https://issues.apache.org/jira/browse/SUREFIRE-1752
>             Project: Maven Surefire
>          Issue Type: New Feature
>          Components: Junit 4.7+ (parallel) support
>    Affects Versions: 3.0.0-M4
>            Reporter: Stephan Bauer
>            Priority: Major
>
> According to [http://maven.apache.org/surefire/maven-failsafe-plugin/integration-test-mojo.html] the "parallel" configuration element currently only supports the following values:
>  * suites
>  * suitesAndClasses
>  * suitesAndMethods
>  * classesAndMethods
> We have a huge multi-module application with integrationtests living in many separate integrationtest-modules. Until now, all the integrationtests were executed through one additional central integrationtest-module, that contained the testsuite definitions. Each testsuites consists of tests from different integrationtest-modules.
> Example:
>  * Testsuite A refers to tests from integrationtest-modules M1, M2 and M3
>  * Testsuite B refers to tests from integrationtest-modules M1, M3 and M4
>  * Testsuite C refers to tests from integrationtest-modules M2, M3 and M4
> (all testsuites are disjoint, which means that each test belongs to exactly one testsuite)
> Until now, the different testsuites were configured to be run in parallel, by using:
> {code:java}
> <plugin>
> 	<groupId>org.apache.maven.plugins</groupId>
> 	<artifactId>maven-failsafe-plugin</artifactId>
> 	<version>3.0.0-M3</version>
> 	<configuration>
> 		<parallel>suites</parallel>
> 		<threadCountSuites>5</threadCountSuites>
> 	</configuration>
> </plugin>
> {code}
> The central integrationtest module occurs to be more or less a hack, because you need to duplicate all dependencies from all integrationtest modules. This results in the fact, that any integrationtest is not executed with the classpath of its own module but of the central module.
> This turns out to be problematic sometimes (PS: furthermore we couldn't manage to configure the jacoco-maven-plugin properly so that the coverage of all the integrationtests could not measured correcty).
> The idea to solve this is to replace the Testsuites with the Junit4 Categories. Unfortunately, the failsafe-plugin does not provide a value for the "parallel" config element based on the Junit categories. The consequence is, that all integrationtests now run serially which takes far too long and thus is not acceptable for us.
> PS: Another alternative solution would be to upgrade to Junit5 and have parallelization based on the new "Tag" element. But obviously there is no such support available either.
> PS-2: sorry for possibly using the wrong priority. Of course this is rather important for us, because it keeps us from moving away from the old central integrationtest module which is very annoying. I'm wondering that nobody else seems to have the same requirement as I can't imagine, that our usecase with testsuites spanning tests from different integrationtest modules is so exotic...
> Best regards,
> Stephan



--
This message was sent by Atlassian Jira
(v8.3.4#803005)