开发者

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

开发者 https://www.devze.com 2023-03-23 15:45 出处:网络
In _Events.groovy, I created a test type as such: //setup selenium test type eventAllTestsStart = { phasesToRun << \"selenium\"

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

精彩评论

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