TestContext.Current Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the current TestContext instance.
public static Microsoft.VisualStudio.TestTools.UnitTesting.TestContext? Current { get; }
[System.Diagnostics.CodeAnalysis.Experimental("MSTESTEXP", UrlFormat="https://aka.ms/mstest/diagnostics#{0}")]
public static Microsoft.VisualStudio.TestTools.UnitTesting.TestContext? Current { get; }
static member Current : Microsoft.VisualStudio.TestTools.UnitTesting.TestContext
[<System.Diagnostics.CodeAnalysis.Experimental("MSTESTEXP", UrlFormat="https://aka.ms/mstest/diagnostics#{0}")>]
static member Current : Microsoft.VisualStudio.TestTools.UnitTesting.TestContext
Public Shared ReadOnly Property Current As TestContext
Property Value
- Attributes
Remarks
This property returns the context for the currently executing test. When accessed outside of a test execution, it returns null.