TestRun Class

Definition

Provides ambient access to information about the currently-executing test run.

public static class TestRun
[System.Diagnostics.CodeAnalysis.Experimental("MSTESTEXP", UrlFormat="https://aka.ms/mstest/diagnostics#{0}")]
[System.Runtime.CompilerServices.Nullable(0)]
public static class TestRun
type TestRun = class
[<System.Diagnostics.CodeAnalysis.Experimental("MSTESTEXP", UrlFormat="https://aka.ms/mstest/diagnostics#{0}")>]
[<System.Runtime.CompilerServices.Nullable(0)>]
type TestRun = class
Public Class TestRun
Inheritance
TestRun
Attributes

Remarks

Current always returns a non-nullITestRunInfo; before tests start executing it exposes empty collections.

The information is scoped to the current process and (on .NET Framework) the current AppDomain. Cross-process or cross-AppDomain test runs each have their own snapshot.

Properties

Name Description
Current

Gets information about the currently-executing test run. Never returns null.

Applies to