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

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • robot-plugin
    • None
    • Jenkins ver. 1.529
      robot-plugin ver. 1.4.0

      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

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

              Created:
              Updated:
              Resolved: