WebTestRequest.Outcome 属性

获取或设置 Web 性能测试请求的“通过”或“未通过”结果。

命名空间:  Microsoft.VisualStudio.TestTools.WebTesting
程序集:  Microsoft.VisualStudio.QualityTools.WebTestFramework(在 Microsoft.VisualStudio.QualityTools.WebTestFramework.dll 中)

语法

声明
Public Property Outcome As Outcome
public Outcome Outcome { get; set; }
public:
property Outcome Outcome {
    Outcome get ();
    void set (Outcome value);
}
member Outcome : Outcome with get, set
function get Outcome () : Outcome
function set Outcome (value : Outcome)

属性值

类型:Microsoft.VisualStudio.TestTools.WebTesting.Outcome
Web 性能测试请求的结果。

备注

设置 WebTestRequest.Outcome 的主要原因是要忽略预期失败,以使得 WebTestRequest 不受预期失败的影响,仍标记为“通过”。

如果您的 Web 性能测试代码设置 WebTestRequest 的结果,则应在 PostRequest 事件处理程序中进行设置。 如果您先前设置了它,则 Web 性能测试运行时引擎可能会重写您所设置的值。

.NET Framework 安全性

请参见

参考

WebTestRequest 类

Microsoft.VisualStudio.TestTools.WebTesting 命名空间