Ben
Ben

Reputation: 283

Robotframework Jenkins Plugin Multi-Module reports

I have a question regarding the Robotframework Jenkins Plugin (https://wiki.jenkins-ci.org/display/JENKINS/Robot+Framework+Plugin) and a multi module maven project: As of the changelog in the latest release 1.4.0: JENKINS-8381 Robot summary and trend graph for multi-configuration projects has been implemented. But how can I use that new functionality in a multi module maven project?

pom.xml of parent:

<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>

pom.xml of submodule1:

<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>

The Jenkins Job will then call 'mvn install' on the parent pom which will trigger all submodules to run robotframework with their testsuites and in the end a log.html, report.html and output.xml will be generated for each submodule in their own folder:/submodule1/target/robotframework-reports/output.xml, /submodule2/target/robotframework-reports/output.xml, etc.

Now the Robotframework Jenkins Plugin should aggregate those results. But with my configuration of the plugin (*/report.html, */log.html, **/output.xml) it displays only the reports for submodule2. How can the aggregation of the reports be configured?

Upvotes: 1

Views: 1067

Answers (1)

Ben
Ben

Reputation: 283

After I tried various different configurations of the Robotframework Jenkins Plugin and it still doesn't work as expected, I started to debug the code and found a bug in the plugin!

For more info please see: https://issues.jenkins-ci.org/browse/JENKINS-21644

Upvotes: 1

Related Questions