intellij-idea - Geb/Spock错误-未配置报告目录,您需要在配置文件中或通过构建适配器进行设置

标签 intellij-idea gradle groovy functional-testing geb

我无法从IntelliJ IDE运行功能测试。运行功能测试时,出现以下错误消息:

java.lang.IllegalStateException: No reports dir has been configured, you need to set in the config file or via the build adapter.

    at geb.Browser.getReportGroupDir(Browser.groovy:899)
    at geb.Browser.cleanReportGroupDir(Browser.groovy:932)
    at geb.spock.GebSpec.methodMissing(GebSpec.groovy:56)
    at geb.spock.GebReportingSpec.setupSpec(GebReportingSpec.groovy:37)

根据我的研究,我需要做的就是在GebConfig.groovy中添加以下代码:
reportsDir = new File("target/runtime_reports_dir")
我将这一行添加到GebConfig.groovy并重建项目,但仍然遇到相同的问题。此错误还有其他解决方法吗?

最佳答案

将reportDir ='target / geb-reports'添加到您的GebConfig应该解决此问题,您能告诉我您的GebConfig文件吗?

它还有另一个修复程序,您的测试类扩展了GebReportingSpec,您可以将其更改为GebSpec,它也应该起作用。

关于intellij-idea - Geb/Spock错误-未配置报告目录,您需要在配置文件中或通过构建适配器进行设置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40688102/

相关文章:

gradle - 找不到方法cargo()作为参数

android - Google Play 服务 - 客户端版本与软件包版本

java - 是否有用于 IntelliJ IDEA 的 GWT UI 设计器?

java - 将 .html 文件与 Bootstrap 的 .css 连接

java - Jetty + intellij idea::添加库

android - 在 intellij 16 中创建 Android 应用程序时 Gradle 同步失败

database-design - GORM ID的生成和belongsTo关联?

Grails 如何解析文本文件?

mysql - 如何过滤 hashMap 的结果以选取以某个字母开头的所有键 Groovy

javascript - 字符范围内的正则表达式字符类未通过 intellij 的 jsLint 检查