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

JUnit publisher does not automatically pick up test results from the tycho-surefire-plugin

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      I am using the pipeline-maven-plugin with a project that runs multiple Maven times. One of the invocations uses the Eclipse Tycho toolchain to build a set of Eclipse plug-ins. When using Eclipse Tycho, tests are prepared and executed with the tycho-surefire-plugin, which places the results by default in the ${project.build.directory}/surefire-reports directory ( reference ).

      It would be great if the test results from tycho would be automatically picked up, just like the surefire and failsafe results.

      The affected build is at https://builds.apache.org/job/Sling/job/sling-ide-tooling/ ( although I might try to find a workaround in the meantime ) and is built using a regular Jenkinsfile and the Pipeline library from https://github.com/apache/sling-tooling-jenkins/.

        Attachments

          Activity

          Hide
          cleclerc Cyrille Le Clerc added a comment -

          Fixed in pipeline-maven-3.6.8-beta-1 , Robert Munteanu can you please test?

          Release and release notes:
          https://github.com/jenkinsci/pipeline-maven-plugin/releases/tag/pipeline-maven-3.6.8-beta-1

          Show
          cleclerc Cyrille Le Clerc added a comment - Fixed in pipeline-maven-3.6.8-beta-1 , Robert Munteanu can you please test? Release and release notes: https://github.com/jenkinsci/pipeline-maven-plugin/releases/tag/pipeline-maven-3.6.8-beta-1
          Hide
          rombert Robert Munteanu added a comment -

          Thanks for the fix Cyrille Le Clerc. I am currently unable to verify the fix since I'm not managing the Jenkins instance and an upgrade will take some time.

          Show
          rombert Robert Munteanu added a comment - Thanks for the fix Cyrille Le Clerc . I am currently unable to verify the fix since I'm not managing the Jenkins instance and an upgrade will take some time.
          Hide
          josletj Jérôme Joslet added a comment -

          A workaround is to declare the Maven Surefire plugin in you pom.xml to a folder that does not exists. Jenkins detect the execution and then check for Surefire reports. Since the output folder for reports is the same for Maven Surefire and Tycho Surefire, the publisher retrieves the reports generated by Tycho.

          <build>
          	<plugins>
          		<plugin>
          			<groupId>org.apache.maven.plugins</groupId>
          			<artifactId>maven-surefire-plugin</artifactId>
          			<configuration>
          				<testSourceDirectory>maven-test</testSourceDirectory>
          			</configuration>
          			<executions>
          				<execution>
          					<phase>test</phase>
          					<goals>
          						<goal>test</goal>
          					</goals>
          				</execution>
          			</executions>
          		</plugin>
          	</plugins>
          </build>
          

          Any news for a bug fix to be released ?

          Show
          josletj Jérôme Joslet added a comment - A workaround is to declare the Maven Surefire plugin in you pom.xml to a folder that does not exists. Jenkins detect the execution and then check for Surefire reports. Since the output folder for reports is the same for Maven Surefire and Tycho Surefire, the publisher retrieves the reports generated by Tycho. <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <configuration> <testSourceDirectory>maven-test</testSourceDirectory> </configuration> <executions> <execution> <phase>test</phase> <goals> <goal>test</goal> </goals> </execution> </executions> </plugin> </plugins> </build> Any news for a bug fix to be released ?
          Hide
          cleclerc Cyrille Le Clerc added a comment -

          Jérôme Joslet I forgot to close the ticket. The enhancement has been shipped in version 3.6.8 shipped in March 2019 https://github.com/jenkinsci/pipeline-maven-plugin/releases/tag/pipeline-maven-3.6.8

          The latest version is 3.8.2

          Show
          cleclerc Cyrille Le Clerc added a comment - Jérôme Joslet  I forgot to close the ticket. The enhancement has been shipped in version 3.6.8 shipped in March 2019  https://github.com/jenkinsci/pipeline-maven-plugin/releases/tag/pipeline-maven-3.6.8 The latest version is 3.8.2
          Hide
          cleclerc Cyrille Le Clerc added a comment -

          Fixed in version 3.6.8

          Show
          cleclerc Cyrille Le Clerc added a comment - Fixed in version 3.6.8
          Hide
          josletj Jérôme Joslet added a comment - - edited

          Our instance is running with org.jenkins-ci.plugins:pipeline-maven:3.8.2 and the problem is still present.

          Here is a project to reproduce: tycho-demo.zip

          This project should be unstable but it succeed and no tests are reported.

          Show
          josletj Jérôme Joslet added a comment - - edited Our instance is running with org.jenkins-ci.plugins:pipeline-maven:3.8.2 and the problem is still present. Here is a project to reproduce: tycho-demo.zip This project should be unstable but it succeed and no tests are reported.

            People

            Assignee:
            cleclerc Cyrille Le Clerc
            Reporter:
            rombert Robert Munteanu
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: