Export (0) Print
Expand All

WebTestRequest.ExpectedHttpStatusCode Property

Gets or sets the HTTP status code that is expected for this request.

Namespace:  Microsoft.VisualStudio.TestTools.WebTesting
Assembly:  Microsoft.VisualStudio.QualityTools.WebTestFramework (in Microsoft.VisualStudio.QualityTools.WebTestFramework.dll)

public int ExpectedHttpStatusCode { get; set; }

Property Value

Type: System.Int32
The HTTP status code.

You can use this property in code to prevent a request failure when you expect a failure status for a request, such as a "404 Not Found" status.

Community Additions

ADD
Show:
© 2014 Microsoft