Click to Rate and Give Feedback
Collapse All/Expand All Collapse All
This page is specific to
Microsoft Visual Studio 2010/.NET Framework 4

Other versions are also available for the following:
API Reference for Testing Tools for Visual Studio ALM
WebTest..::.Outcome Property

Gets or sets the Pass or Fail outcome of the Web performance test.

Namespace:  Microsoft.VisualStudio.TestTools.WebTesting
Assembly:  Microsoft.VisualStudio.QualityTools.WebTestFramework (in Microsoft.VisualStudio.QualityTools.WebTestFramework.dll)
Visual Basic
Public Property Outcome As Outcome
C#
public Outcome Outcome { get; set; }
Visual C++
public:
property Outcome Outcome {
    Outcome get ();
    void set (Outcome value);
}
F#
member Outcome : Outcome with get, set
JScript
function get Outcome () : Outcome
function set Outcome (value : Outcome)

Property Value

Type: Microsoft.VisualStudio.TestTools.WebTesting..::.Outcome
The outcome of the Web performance test.

The primary reason to set WebTest.Outcome is to ignore an expected failure so that the WebTest is marked as Passed despite the expected failure.

Because the Web performance test runtime engine also sets the Outcome property of WebTest, the final value of the Outcome property might not be the same as the value that your code sets.

If you set the value of WebTest.Outcome to Fail, the Web performance test runtime engine will not override that setting, and the Web performance test will be marked as Failed when it is completed. However, if you set WebTest.Outcome to Pass in the middle of a Web performance test, before all Web performance test requests have been issued and validation rules have been invoked, the Web performance test runtime engine overrides the value and sets WebTest.Outcome to Fail if there is an error after you set the value to Pass.

To guarantee that the final value for WebTest.Outcome is Pass, set it in the PostWebTest event handler.

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2012 Microsoft. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker