Uploaded image for project: 'Maven Surefire'
  1. Maven Surefire
  2. SUREFIRE-1752

Implement new value for the "parallel" config element (e.g. "categories")

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 3.0.0-M4
    • None
    • None

    Description

      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:

      <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>
      
      

      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

      Attachments

        Activity

          People

            Unassigned Unassigned
            stephan7777 Stephan Bauer
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: