TestContext.CurrentTestOutcome 属性

您可以在 TestCleanup 方法中使用此属性来确定已经运行的测试的结果。

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

语法

声明
Public Overridable ReadOnly Property CurrentTestOutcome As UnitTestOutcome
    Get
public virtual UnitTestOutcome CurrentTestOutcome { get; }
public:
virtual property UnitTestOutcome CurrentTestOutcome {
    UnitTestOutcome get ();
}
abstract CurrentTestOutcome : UnitTestOutcome
override CurrentTestOutcome : UnitTestOutcome
function get CurrentTestOutcome () : UnitTestOutcome

属性值

类型:Microsoft.VisualStudio.TestTools.UnitTesting.UnitTestOutcome
说明已运行测试的结果的 UnitTestOutcome

.NET Framework 安全性

请参见

参考

TestContext 类

Microsoft.VisualStudio.TestTools.UnitTesting 命名空间