3 messages in com.canoo.lists.webtest[Webtest] Redirect
FromSent OnAttachments
Immo H=?ISO-8859-1?B?/A==?=neke11 Nov 2005 02:22 
Paul King11 Nov 2005 04:10 
Marc Guillemot11 Nov 2005 05:09 
Subject:[Webtest] Redirect
From:Immo H=?ISO-8859-1?B?/A==?=neke (Im@Huneke.Co.UK)
Date:11/11/2005 02:22:00 AM
List:com.canoo.lists.webtest

Hi,

Marc Guillemot wrote on 11 Oct 2005:

http redirect are followed (even if common-httpclient's log says it's disabled).

I am trying to test an HTTP service to check that it returns the correct status code (200, 404, 302 being the most common ones) depending on the requested URL and some HTTP header values.

So I deliberately wish to disable following HTTP redirect instructions. Is there some way to turn this off in HTMLunit - and if so, how would I configure WebTest to do so?

Secondly, using the config, storeHeader and verifyProperty tags, it is easy to set and check HTTP headers, but there seems to be no way to check that the response contains the expected status code. How to do this? HTMLunit allows the status code of the last HTTP response to be interrogated - could WebTest make this available as a predefined Property?

A quick answer would be much appreciated!

Best regards, Immo Huneke