我正在使用Atlassian Bamboo构建Grails 3应用程序。我已经按照my answer to this question中的说明配置了Grails 3任务。
我很难让Bamboo找到我的测试报告。在Grails任务类型上,您可以指定任务是否产生测试结果,如果是,则指定其来源。所以我尝试了以下方法:
**/*reports/*.xml
(选择“指定...”时的默认值)build/reports/tests/index.html
这三个都会产生此错误:
Could not find test result reports in the /home/bamboo/bamboo-agent-home/xml-data/build-dir/CSSO-MPA4-JOB1 directory.
最佳答案
正确的答案是build/test-results/*.xml
,因为这是JUnit放置其测试报告的地方。**/*-reports/*.xml
失败,因为它在-results
中。build/reports/tests/index.html
失败,因为它在输入框的正上方说:
Test output must be in JUnit XML format.
我(从this thread中的某个地方)发现JUnit负责生成独立于Gradle / Grails的测试结果,这就是我发现它们位于奇怪地方的原因。
关于grails - 正确指定在Bamboo上构建的Grails 3的测试报告位置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35423613/