Test Summary Not Populated With Test Results in CircleCI

☆樱花仙子☆ 提交于 2019-12-08 00:05:25

问题


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

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).

I have looked into the documentation here:

  • Store test results
  • Metadata collection in custom steps

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.


回答1:


To upload tests results on circle, you have to speficy the main test folder not the files.

In your case it should be

- store_test_results:
    path: test


来源:https://stackoverflow.com/questions/47236086/test-summary-not-populated-with-test-results-in-circleci

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!