WebTestRequest.Outcome Property
Gets or sets the Pass or Fail outcome of the Web test request.
Namespace: Microsoft.VisualStudio.TestTools.WebTesting
Assembly: Microsoft.VisualStudio.QualityTools.WebTestFramework (in Microsoft.VisualStudio.QualityTools.WebTestFramework.dll)
Syntax
'Declaration
Public Property Outcome As Outcome
'Usage
Dim instance As WebTestRequest
Dim value As Outcome
value = instance.Outcome
instance.Outcome = value
public Outcome Outcome { get; set; }
public:
property Outcome Outcome {
Outcome get ();
void set (Outcome value);
}
public function get Outcome () : Outcome
public function set Outcome (value : Outcome)
Property Value
Type: Microsoft.VisualStudio.TestTools.WebTesting.Outcome
The outcome of the Web test request.
Remarks
The primary reason to set WebTestRequest.Outcome is to ignore an expected failure so that the WebTestRequest is marked as Passed despite the expected failure.
If your Web test code sets the Outcome of a WebTestRequest, it should do so in a PostRequest event handler, because if you set it earlier the Web test runtime engine might override the value that you set.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.