Marc,
I added the config option you mentioned (see below) and the test still fails
without executing the verifyXPath check.
During the execution I see the following console output:
--------------------------------------------------------------------
[config] INFO (com.canoo.webtest.engine.Configuration) - Exception while
trying to set boolean option:
com.gargoylesoftware.htmlunit.WebClient.setThrowExceptionOnFailingStatusCode,(boolean)
[config] INFO (com.canoo.webtest.engine.Configuration) - Exception while
trying to set integer option: For input string: "false"
[config] WARN (com.canoo.webtest.engine.Configuration) - Unknown option
<ThrowExceptionOnFailingStatusCode,>. Ignored.
--------------------------------------------------------------------
Have I implemented the config improperly?
Doug
--------------------------------------------------------------------
<webtest name="Login Invalid User">
<config>
<option name="ThrowExceptionOnFailingStatusCode," value="false"/>
</config>
<steps>
<invoke url="http://${HOST}:${PORT}/identity/${VERSION}/login"
username="${INVALIDUSER}" password="${INVALIDPASSWORD}"
description="Login Invalid User"
/>
<verifyXPath
description="Check login status code equals 401"
xpath="//@statusCode='401'"
/>
</steps>
</webtest>
--------------------------------------------------------------------
>>> Marc Guillemot <[EMAIL PROTECTED]> 01/17/08 2:06 AM >>>
Hi,
WebTest default behavior is to fail when an http error code is received.
You can change this with
<config>
<option name="ThrowExceptionOnFailingStatusCode," value="false"/>
</config
or
<groovy>
step.context.webClient.throwExceptionOnFailingStatusCode = false
</groovy>
Cheers,
Marc.
--
----------------------------------------------------------------------
NOTICE: This email message is for the sole use of the intended recipient(s) and
may contain confidential and privileged information. Any unauthorized review,
use, disclosure or distribution is prohibited. If you are not the intended
recipient, please contact the sender by reply email and destroy all copies of
the original message.
_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest