【问题标题】:junitxml jenkins plugin not showing output of passed tests (PyTest)junitxml jenkins 插件未显示通过测试的输出(PyTest)
【发布时间】:2019-06-11 10:01:05
【问题描述】:

我正在 Jenkins 计划作业中运行 pytest 测试并生成如下所示的 junitxml 报告

pytest --junitxml=report.xml

然后我使用发布 junit 测试结果的构建后操作,我可以看到结果,但我没有看到通过测试的输出(即使我选中了“保留长标准输出/错误”复选框

在 Jenkins 中使用 pytest + junitxml 发布者时,有人成功显示了通过测试的输出吗?

【问题讨论】:

  • 你的意思是什么输出,测试中的自定义打印?
  • 是的,在我的特殊情况下,在测试期间我运行了一个外部 JAR,我希望得到它的所有输出(即使测试通过了)
  • 你能提供一个minimal reproducible example吗?如果我在测试中打印内容,则输出将包含在 JUnit 报告中。

标签: jenkins jenkins-plugins pytest


【解决方案1】:

这是由于 Pytest 没有在 .xml 中添加行尾。

【讨论】:

    猜你喜欢
    • 2015-06-24
    • 1970-01-01
    • 1970-01-01
    • 2017-05-04
    • 1970-01-01
    • 2015-05-06
    • 2021-04-30
    • 1970-01-01
    • 2018-02-15
    相关资源
    最近更新 更多