Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Test Summary Not Populated With Test Results in CircleCI

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

Test Summary Empty

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.

like image 366
Alexis.Rolland Avatar asked Nov 11 '17 08:11

Alexis.Rolland


1 Answers

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
like image 105
Laurent Erignoux Avatar answered Nov 15 '22 14:11

Laurent Erignoux