我试图按照http://ldaley.com/post/615966534/custom-grails-test上的Luke Daley的说明添加自定义测试类型,该类型应该作为集成规范(grails-2.4.4,btw)。
我已将我的规格置于test / apint下,而我的_Events.groovy则如下所示:
eventAllTestsStart = {
phasesToRun << "apint"
}
def apintSpecsSuffix = "spec"
def apintSpecsDirectory = "apint"
def apintSpecsTestType = new GrailsSpecTestType(apintSpecsSuffix, apintSpecsDirectory)
apintTests = [apintSpecsTestType]
apintTestPhasePreparation = {
integrationTestPhasePreparation()
}
apintTestPhaseCleanUp = {
integrationTestPhaseCleanUp()
}
当我运行grails test-app apint:
时,收到以下错误消息:
Fatal error running tests: No signature of method: org.codehaus.groovy.grails.test.runner.phase.IntegrationTestPhaseConfigurer.prepare() is applicable for argument types: () values: []
Possible solutions: prepare(groovy.lang.Binding, java.util.Map), prepare(groovy.lang.Binding, java.util.Map), grep(), grep(java.lang.Object), every(), println() (Use --stacktrace to see the full trace)
.Tests FAILED
为什么会发生这种情况或如何解决这个问题?
谢谢!