Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-62715

Test fail with custom surefire args

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • jacoco-plugin
    • None

      Running the unit tests with custom surefire arguments like for example:

      `mvn clean jacoco:prepare-agent test -DargLine="-Djava.awt.headless=true"` results in test errors as the `argLine` property that `prepare-agent` customizes is overriden by the CLI one, resulting in no java agent passed to the test execution and so no `jacoco.exec` file present.

      For example this will make PCT executions of this plugin fail if the `testJavaArgs` argument is used. A more in depth description can be found on https://www.eclemma.org/jacoco/trunk/doc/prepare-agent-mojo.html and http://www.devll.org/blog/2020/java/jacoco-argline.html

            raul_arabaolaza Raul Arabaolaza
            raul_arabaolaza Raul Arabaolaza
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: