To flush this out, we enabled the following in our webtest (see storeResponseCode)
void webtest(String name, Closure yield) {
ant.testSpec(name: name) {
config(configMap) {
option(name: "ThrowExceptionOnFailingStatusCode", value: false)
}
steps {
yield.delegate = ant
yield()
}
}
}
then added
webtest("MyTest: some test"){
invoke(url:'/urlThatWorks')
storeResponseCode(property:"status")
verifyProperty(name:"status", text:"200")
.... [rest of test]
}
Our test passed with 200 status code, thus revealing the clue... our advert IFRAME within the page was 404'ing and the actual cause of our webtest failure.
No comments:
Post a Comment