WebTestRequest.Outcome 属性
获取或设置 Web 性能测试请求的“通过”或“未通过”结果。
命名空间: Microsoft.VisualStudio.TestTools.WebTesting
程序集: Microsoft.VisualStudio.QualityTools.WebTestFramework(在 Microsoft.VisualStudio.QualityTools.WebTestFramework.dll 中)
语法
声明
Public Property Outcome As Outcome
Get
Set
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 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关更多信息,请参见通过部分受信任的代码使用库。