CircleCI中未填充测试结果的测试摘要 [英] Test Summary Not Populated With Test Results in CircleCI
问题描述
在CircleCI中,我有一个执行自动化测试的构建.它使用nose2
和junit
插件在XML文件中生成测试结果.测试结果文件的完整路径为:
In CircleCI, I have a build executing automated tests. It generates tests results in an XML file using nose2
and junit
plugin. The complete path of the test result file is:
/project-folder/test/junit/test-result.xml
文件/project-folder/.circleci/config.yml
中的我的CircleCI配置包含以下内容:
My CircleCI configuration in the file /project-folder/.circleci/config.yml
contains this:
- store_artifacts:
path: test/junit/test-results.xml
destination: test-results
- store_test_results:
path: test/junit/test-results.xml
执行构建时,它确认测试结果和工件已正确加载:
When the build executes, it confirms that test results and artifacts are properly loaded:
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
但是,测试结果仍未出现在测试摘要标签中(请参见下面的屏幕截图).
However, the test results still do not appear in the Test Summary tab (see screenshot below).
我在这里查看了文档:
- Store test results
- Metadata collection in custom steps
但是我看不到我想念的东西吗?我也不明白上面链接中的变量$CIRCLE_TEST_REPORTS
指的是什么.它包含什么以及如何在配置中使用它.
But I fail to see what I am missing? I also do not understand what the variable $CIRCLE_TEST_REPORTS
refers to in the link above. What does it contain and how I should use it in my configuration.
推荐答案
要在圆圈上上传测试结果,您必须指定主测试文件夹而不是文件.
To upload tests results on circle, you have to speficy the main test folder not the files.
您的情况应该是
- store_test_results:
path: test
这篇关于CircleCI中未填充测试结果的测试摘要的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!