Correctly specify test report location for Grails 3 build on Bamboo

邮差的信 提交于 2020-01-06 01:54:13

问题


I am building a Grails 3 application using Atlassian Bamboo. I've configured the Grails 3 task as explained in my answer to this question.

I am having trouble getting Bamboo to find my test reports. On the Grails task type, you can specify if the task produces test results, and if so, where they come from. So I have tried the following:

  • Look in the standard test results directory
  • Specify custom results directories:
    • **/*reports/*.xml (which is the default when you choose Specify...)
    • build/reports/tests/index.html

All three produce this error:

Could not find test result reports in the /home/bamboo/bamboo-agent-home/xml-data/build-dir/CSSO-MPA4-JOB1 directory.


回答1:


The correct answer is build/test-results/*.xml, as that is where JUnit puts its test reports.

**/*-reports/*.xml fails because it is in -results.

build/reports/tests/index.html fails because, as it says right above the input box:

Test output must be in JUnit XML format.

I discovered (from somewhere in this thread) that JUnit is responsible for generating the test results independent of Gradle / Grails, which is how I found they were in an odd place.



来源:https://stackoverflow.com/questions/35423613/correctly-specify-test-report-location-for-grails-3-build-on-bamboo

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