Share via


Orcas Feature: Expected HTTP Status Code

Expected HTTP Status Codeis a new Web test request property that specifies the numeric HTTP status code that indicates success for the request. The value can be set on top level requests and explicitly added dependent requests. The primary purpose of the property is to ignore certain failures on dependent requests. By default, the recorder sets this value to 0, which means any 200 or 300 level return code is a success and any 400 or 500 level status is a failure.

 

Explicitly Added Dependents

Parsed dependent requests collection is generated at runtime. It is the result of parsing the response of the top level page request. An explicitly added Dependent request refers to a request added by right clicking on a top-level request and selecting “Add Dependent Request”.

 

If a dependent request is explicitly added to a request, that dependent will always be fetched according to the definition of the request. If the request fails, but matches the Expected HTTP code on the request definition, the dependent request will be marked as pass. For example, the value can be set to 404 if you expect that the request will not be found on the web server.

 

If a dependent request is explicitly added to a request, and Parse Dependents is set to true, and a matching request is parsed, the matching dependent request will not be submitted.

 

Redirects

For redirected requests, if the Follow Redirects property is set to true, the Expected HTTP Status Code works against the redirected URL.

Comments

  • Anonymous
    April 06, 2008
    I need help!  I am a user, without any understanding of what you wrote in the blog save that what I'm receiving is an error code.  What I want to know is, what can I do to fix the following: Unexpected HTTP response -- status code 12152 I have Windows XP, using Explorer. Thank you, Mary Montgomery