首页 > 解决方案 > 在 gradle 项目中设置 Allure 测试报告时出错

问题描述

我想使用 gradle ( https://gebish.org/ ) 为 geb 框架设置 Allure 测试报告,但是尽管在结果文件夹中创建了 json 文件,但得到以下错误。

src/test/resources在(项目文件夹内)中添加了具有以下内容的 allure.properties :

allure.results.directory=build/allure-results

还将它添加到 build.gradle,它指向正确的位置:

systemProperty 'allure.results.directory', "$buildDir/allure-results"

https://gist.github.com/rnemeth1980/df0f7ed46487fca13e8d412c23984fbb 显示部分 build.gradle

收到以下错误消息:

Cannot write to file '/home/abc/build/allure-results' specified for property '$1' as it is a directory.

更详细的错误日志 https://gist.github.com/rnemeth1980/9c66bc96046086253c79275e88aef5d2

请帮忙。

标签: gradleallure

解决方案


我遇到过同样的问题。通过在 Intellij 中安装“Gradle Extension”插件来解决它。


推荐阅读