Hi Mark,
That's nice. I have a question. In my web test sometimes I get a
exception which is as follows;
com.canoo.webtest.engine.StepFailedException: Step[clickButton "add
bidder to favorites" (11/25)]: HTTP error 500, at: clickButton, Step:
ClickButton........
This is from the report I generate after running my tests. But actually
it is bug in the web-application I'm testing and I am able to check the
logs of tomcat and see the stack trace behind the HTTP error 500 thrown
from the application. Is there a way I can catch this in canoo webtest
and show it in the test report page where there is a error?
Thanks in advance,
Shafeer.
Marc Guillemot schrieb:
Hi,
here a small ruse to get ALL content (ie html, js, ...) received by webtest
saved on the disk together with an overview of what has been received (with http
response code). In some cases this is more usefull than the responses saved by
webtest or than the log output or than a proxy to understand what is going
wrong.
In this example the overview is created in the user's temporary dir as
"test.html". This steps just need to be added in the <steps> at the first
position (or later if the answers received at the beginning don't matter):
<webtest>
<config .../>
<steps>
<groovy description="wrapp connection in a debug connection">
import com.gargoylesoftware.htmlunit.util.DebuggingWebConnection
def webClient = step.context.webClient
webClient.webConnection = new
DebuggingWebConnection(webClient.webConnection, "test")
</groovy>
... the other steps ...
</steps>
</webtest>
Happy testing (and debugging),
Marc.
_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest
--
Shafeer Hajamohideen
mindmatters*
* Neuer Kamp 30
20357 Hamburg
Fon +49 40 31792272
Fax +49 40 31792273
E-Mail mailto:[EMAIL PROTECTED]
Website http://www.mindmatters.de/
-------------------------------------------------------------------------
Es läuft und läuft und läuft: Schon über 17.000 Downloads für JSF-Spring,
unsere JSF-/Spring-Integrationslösung! http://jsf-spring.sourceforge.net/
-------------------------------------------------------------------------
_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest