【问题标题】:Robot framework: How to merge two xunit xml report files?机器人框架:如何合并两个 xunit xml 报告文件?
【发布时间】:2020-01-24 18:53:37
【问题描述】:

1.我的机器人文件运行后基本生成4个文件。 output.xml、xunit.xml、report.html 和 log.html 2.重新运行后,我想将重新运行生成的报告文件与旧的合并,得到一个新的文件。 稍后,Xunit xmls 用于更新 qtest 测试用例。

我无法使用“--merge”命令合并 Xunit xmls

错误:

[ 错误 ] 读取 XML 源 '../../../xunit.xml' 失败:不兼容的 XML 元素 'testsuite'。 请帮忙解决这个问题

【问题讨论】:

    标签: xml jenkins merge robotframework qtestlib


    【解决方案1】:

    您需要先合并输出的 xml 文件,然后从中创建一个 xunit 文件。

    为了实现这一点,有一个名为 rebot 的工具与 Robot Framework 一起安装。运行 Robot Framework 测试并拥有多个不同的 output.xml 文件后,您可以运行以下命令:

    假设您有 output1.xml 和 output2.xml。

    rebot -R --xunit mergedxunit.xml output*.xml
    

    运行该命令将创建一个新的 mergedxunit.xml 文件,其中包含以 xunit 格式在 output1.xmloutput2.xml 中运行的所有测试用例。请注意,如果您删除 -R 标志,新的输出测试将替换组合文件中的相同测试。

    这是rebot.py 代码文件,其中包含有关所有不同可接受参数的信息: https://github.com/robotframework/robotframework/blob/master/src/robot/rebot.py

    【讨论】:

      猜你喜欢
      • 2014-11-17
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-11-16
      • 1970-01-01
      • 1970-01-01
      • 2011-09-01
      相关资源
      最近更新 更多