【问题标题】:Test Summary Not Populated With Test Results in CircleCICircleCI 中的测试结果未填充测试摘要
【发布时间】:2017-11-11 08:51:46
【问题描述】:

在 CircleCI 中,我有一个执行自动化测试的构建。它使用nose2 和junit 插件在XML 文件中生成测试结果。测试结果文件完整路径为:

/project-folder/test/junit/test-result.xml

/project-folder/.circleci/config.yml 文件中的我的 CircleCI 配置包含以下内容:

- store_artifacts:
    path: test/junit/test-results.xml
    destination: test-results

- store_test_results:
    path: test/junit/test-results.xml

构建执行时,它会确认测试结果和工件已正确加载:

Uploading artifacts
Uploading /home/circleci/repo/test/junit/test-results.xml to test-results
Uploaded /home/circleci/repo/test/junit/test-results.xml

Uploading test results
Archiving the following test results
  * /home/circleci/repo/test/junit/test-results.xml

Uploaded 

但是,测试摘要标签中仍然没有显示测试结果(请参见下面的屏幕截图)。

我在这里查看了文档:

但我看不到我错过了什么?我也不明白上面链接中的变量$CIRCLE_TEST_REPORTS 指的是什么。它包含什么以及我应该如何在我的配置中使用它。

【问题讨论】:

    标签: python unit-testing junit continuous-integration circleci


    【解决方案1】:

    要在圈子上上传测试结果,您必须指定主测试文件夹而不是文件。

    在你的情况下应该是

    - store_test_results:
        path: test
    

    【讨论】:

    • 就这么简单...谢谢 Laurent,它成功了 :)
    猜你喜欢
    • 1970-01-01
    • 2020-03-24
    • 2015-05-28
    • 2017-03-23
    • 1970-01-01
    • 2017-10-03
    • 2014-05-15
    • 2021-11-05
    • 2018-05-19
    相关资源
    最近更新 更多