Share via


TestContext.CurrentTestOutcome Property

You can use this property in a TestCleanup method to determine the outcome of a test that has run.

Namespace:  Microsoft.VisualStudio.TestTools.UnitTesting
Assembly:  Microsoft.VisualStudio.QualityTools.UnitTestFramework (in Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll)

Syntax

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

Property Value

Type: Microsoft.VisualStudio.TestTools.UnitTesting.UnitTestOutcome
A UnitTestOutcome that states the outcome of a test that has run.

.NET Framework Security

See Also

Reference

TestContext Class

Microsoft.VisualStudio.TestTools.UnitTesting Namespace