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

Aggregated results in a multimodule maven project displays only values of the last submodule

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: robot-plugin
    • Labels:
      None
    • Environment:
      Jenkins ver. 1.529
      robot-plugin ver. 1.4.0
    • Similar Issues:

      Description

      Given is a multimodule maven project, with the following parent pom.xml:

      project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
      
      <modelVersion>4.0.0</modelVersion>
      
      <groupId>test</groupId>
      <artifactId>parent</artifactId>
      <version>1.0-SNAPSHOT</version>
      <packaging>pom</packaging>
      
      <name>Parent</name>
      
      <modules>
          <module>submodule1</module>
          <module>submodule2</module>
      </modules>
      
      <build>
          <pluginManagement>
              <plugins>
                  <plugin>
                      <groupId>org.robotframework</groupId>
                      <artifactId>robotframework-maven-plugin</artifactId>
                      <version>${default.robotframework-maven-plugin.version}</version>
                      <executions>
                          <execution>
                              <goals>
                                  <goal>run</goal>
                              </goals>
                          </execution>
                      </executions>
                      <configuration>
                          <variables>
                              <variable>LANG:EN</variable>
                          </variables>
                          <logLevel>DEBUG</logLevel>
                      </configuration>
                  </plugin>
              </plugins>
          </pluginManagement>
      </build>
      

      And the pom of a submodule:

      <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
      
      <modelVersion>4.0.0</modelVersion>
      
      <parent>
          <groupId>test</groupId>
          <artifactId>parent</artifactId>
          <version>1.0-SNAPSHOT</version>
          <relativePath>../pom.xml</relativePath>
      </parent>
      
      <name>${project.artifactId}</name>
      <artifactId>submodule1</artifactId>
      
      <properties>
          <main.basedir>${project.parent.basedir}</main.basedir>
          <appVersion>${project.version}</appVersion>
      </properties>
      
      <build>
          <plugins>
              <plugin>
                  <groupId>org.robotframework</groupId>
                  <artifactId>robotframework-maven-plugin</artifactId>
                  <configuration>
                      <testCasesDirectory>src/test/robotframework/Suites</testCasesDirectory>
                  </configuration>
              </plugin>
          </plugins>
      </build>
      

      Given is a Jenkins Job which calls mvn install

      The job has the "Robotframework Jenkins Plugin" as Post-Build-Step with the following configuration:

      Directory of Robot output  
      Output xml name **/output.xml
      Report html name **/report.html
      Log html name **/log.html
      Other files to copy */selenium-screenshot-.png
      Thresholds for build result yellow: 0.0, blue 0.0

      Bug:

      Actual after the job has finished execution, the latest robot results displays only the results of the last module
      Expected after the job has finished execution, the latest robot results displays all testsuites / testcases of all modules

      Suggested bugfix:

      https://github.com/jenkinsci/robot-plugin/blob/master/src/main/java/hudson/plugins/robot/RobotParser.java line 89:

      result =  parseResult(reader, baseDirectory);
      

      should be replaced by:

      for (RobotSuiteResult suite : parseResult(reader, baseDirectory))
      {
          result.addSuite(suite);    
      }
      

      Thanks
      Ben

        Attachments

          Issue Links

            Activity

            ben Benjamin Zaiser created issue -
            ben Benjamin Zaiser made changes -
            Field Original Value New Value
            Link This issue is related to JENKINS-8381 [ JENKINS-8381 ]
            Hide
            jussi_malinen Jussi Malinen added a comment -

            I did manage to fix this (I think), but I would prefer trying to write some automatic tests for this stuff before publishing... Some explorative testing would be a good idea as well.

            If you have a chance to try the trunk version out to verify it works now, that would be great.

            Show
            jussi_malinen Jussi Malinen added a comment - I did manage to fix this (I think), but I would prefer trying to write some automatic tests for this stuff before publishing... Some explorative testing would be a good idea as well. If you have a chance to try the trunk version out to verify it works now, that would be great.
            jussi_malinen Jussi Malinen made changes -
            Assignee jpiironen [ jpiironen ] Jussi Malinen [ jussi_malinen ]
            jussi_malinen Jussi Malinen made changes -
            Status Open [ 1 ] Resolved [ 5 ]
            Resolution Fixed [ 1 ]
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 153642 ] JNJira + In-Review [ 194626 ]
            aleksisimell Aleksi Simell made changes -
            Status Resolved [ 5 ] Closed [ 6 ]

              People

              • Assignee:
                jussi_malinen Jussi Malinen
                Reporter:
                ben Benjamin Zaiser
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: