【问题标题】:Differentiate between xml files in Junit Jenkins plugin区分 Junit Jenkins 插件中的 xml 文件
【发布时间】:2018-07-15 11:22:45
【问题描述】:

我正在运行两组 pytest 测试,一组用于 py27,另一组用于 py37(如果有帮助,请在 tox 框架内)

测试结果保存在两个文件中:test_27.xmltest_37.xml

我想在 Jenkins 界面中区分 Python 版本。
Junit Jenkins插件有什么办法吗?

您能想到任何解决方法吗?

谢谢!

【问题讨论】:

    标签: jenkins junit jenkins-plugins tox


    【解决方案1】:

    我自己不使用 Jenkins,也不知道 Junit Jenkins 插件的作用,但正如您提到的 tox:您可以在并行运行的不同管道中运行这两个环境。然后他们每个人都有自己的报告。您将定义一个调用tox -e py27 的管道和另一个调用tox -e py37 的管道,您将把它们完全分开。

    testenv 看起来像这样(参见substitutions):

    [testenv]
    commands = pytest --junitxml=junit-{envname}.xml
    

    每个管道都有自己的报告步骤,有关此的详细信息可以从this article by Dave Hunt 一瞥。

    【讨论】:

      【解决方案2】:

      这是我目前找到的最佳解决方案:Change pytest testsuite name in xml report

      【讨论】:

        猜你喜欢
        • 2013-02-02
        • 1970-01-01
        • 1970-01-01
        • 2016-01-15
        • 2017-04-30
        • 2012-10-23
        • 2014-08-18
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多