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"
}
精彩评论