2017-11-11 371 views
0

在CircleCI中,我有一個構建執行自動化測試。它使用nose2junit插件在XML文件中生成測試結果。測試結果文件的完整路徑是:測試總結未在CircleCI中填充測試結果

/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 

然而,測試結果仍然沒有出現在測試小結標籤(SCR下面的eenshot)。

Test Summary Empty

我特地到這裏的文件:

但我看不出我缺少的是什麼?我也不明白變量$CIRCLE_TEST_REPORTS在上面的鏈接中提到了什麼。它包含什麼以及如何在配置中使用它。

回答

2

要在圓上上傳測試結果,您必須確定主測試文件夾而不是文件。

你的情況應該是

- store_test_results: 
    path: test 
+0

至於這麼簡單...謝謝你洛朗,它的工作:) –