我无法从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/