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

Misleading documentation on forkCount with JUnit provider

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • None
    • None
    • None

    Description

      On this page https://maven.apache.org/surefire/maven-surefire-plugin/examples/fork-options-and-parallel-execution.html I can read the following:

      As reuseForks=false creates a new JVM process for each test class, using parallel=classes would have no effect. You can still use parallel=methods, though.

      When using reuseForks=true and a forkCount value larger than one, test classes are handed over to the forked process one-by-one. Thus, parallel=classes would not change anything.

      However in my experience only the junit47 provider manages forked VM. The junit4 provider simply ignores the forkCount setting.
      As stated in the documentation on JUnit : http://maven.apache.org/surefire/maven-surefire-plugin/examples/junit.html in order to activate the junit47 provider one must set the parallel attribute.

      So on one hand the doc says that the parallel attribute is useless with forkCount but on the other hand if it's not specified, the old junit4 provider is used and forkCount isn't applied.

      Attachments

        Issue Links

          Activity

            People

              tibordigana Tibor Digana
              backuitist Bruno Bieth
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: