开发者

Error executing script TestApp: ApplicationContext requested, but is not present in the build binding

In _Events.groovy, I created a test type as such:

//setup selenium test type
eventAllTestsStart = {
    phasesToRun << "selenium"
}
def seleniumTestType = new JUnit4GrailsTestType('selenium', 'selenium', new GrailsTestMode(autowire: true开发者_如何学Python))
seleniumTests = [seleniumTestType]
seleniumTestPhasePreparation = {
}
seleniumTestPhaseCleanUp = {
}

When I run:

grails test-app selenium:, I get this:

Error executing script TestApp: java.lang.IllegalStateException: ApplicationContext
requested, but is not present in the build binding

What's going on here?


See that autowire line? Looks suspicious, ehh? Remove it.

//setup selenium test type
def seleniumTestType = new JUnit4GrailsTestType('selenium', 'selenium')
seleniumTests = [seleniumTestType]
seleniumTestPhasePreparation = {
    unitTestPhasePreparation()
}
seleniumTestPhaseCleanUp = {
    unitTestPhaseCleanUp()
}

eventAllTestsStart = {
    phasesToRun << "selenium"
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜