It did do what i wanted. Thanks alot Marc.

Date: Wed, 7 Mar 2007 00:56:45 -0800 (PST)
From: Marc Guillemot <[EMAIL PROTECTED]>
To: webtest@lists.canoo.com
Subject: Re: [Webtest] handling 4xx/5xx status code
Reply-To: webtest@lists.canoo.com

Hi,

<config ...>
<option name="ThrowExceptionOnFailingStatusCode" value="false"/>
</config>

should do the job.

Marc.


Parviz deyhim wrote:

Hi All,

This might be a biginner's question. Is there anway to handle 4xx/5xx
NOT as a failure? Im running a test on a URL which is supposed to
return a 403 status code. The problem is that invoking that URL gives
me the following error and wont execute the rest of the steps. How do
I force Invoke to accept the 403 status code:


Test step steps (myTestCases.xml:64: ) null failed with message
"Step[invoke "TEST URL" (1/4)]: HTTP error 403, at: invoke"

Config:

 <steps>
                        <invoke description="TEST URL"
url="http://www.foo.com/testfile"; content="test file" method="POST" />
                        <echo message="status: #{status} " />
                        <storeResponseCode description="store response
code" property="status" />
                        <verifyProperty description="should be error"
name="status" text="403"/>
                </steps>


Thanks
_______________________________________________
WebTest mailing list
WebTest@lists.canoo.com
http://lists.canoo.com/mailman/listinfo/webtest


_______________________________________________
WebTest mailing list
WebTest@lists.canoo.com
http://lists.canoo.com/mailman/listinfo/webtest

Reply via email to