【问题标题】:Robotframework Jenkins Plugin Multi-Module reportsRobotframework Jenkins 插件多模块报告
【发布时间】:2014-02-26 22:25:15
【问题描述】:

我对 Robotframework Jenkins 插件 (https://wiki.jenkins-ci.org/display/JENKINS/Robot+Framework+Plugin) 和一个多模块 maven 项目有疑问: 从最新版本 1.4.0 中的变更日志开始:JENKINS-8381 Robot summary and trend graph for multi-configuration projects 已实施。 但是如何在多模块 maven 项目中使用该新功能?

父级的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>

子模块1的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/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>

然后,Jenkins 作业将在父 pom 上调用“mvn install”,这将触发所有子模块使用它们的测试套件运行机器人框架,最后将为每个子模块生成 log.html、report.html 和 output.xml在他们自己的文件夹中:/submodule1/target/robotframework-reports/output.xml、/submodule2/target/robotframework-reports/output.xml等

现在 Robotframework Jenkins 插件应该汇总这些结果。但是使用我的插件配置(*/report.html、*/log.html、**/output.xml),它只显示 submodule2 的报告。如何配置报告的聚合?

【问题讨论】:

    标签: maven jenkins robotframework


    【解决方案1】:

    在我尝试了Robotframework Jenkins Plugin的各种不同配置后仍然无法正常工作,我开始调试代码,发现插件有bug!

    更多信息请见:https://issues.jenkins-ci.org/browse/JENKINS-21644

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-12-25
      • 2016-01-03
      • 2011-04-15
      • 1970-01-01
      • 1970-01-01
      • 2018-11-21
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多