<PackageReference Include="nunit" Version="2.5.7.10213" />

TestContext

public static class TestContext
Provide the context information of the current test
public static IDictionary Properties { get; }

The properties of the currently executing test or, if no test is running, of the last test run.

public static TestState State { get; }

The TestState of current test. This maps to the ResultState used in nunit.core and is subject to change in the future.

public static TestStatus Status { get; }

The TestStatus of current test. This enum will be used in future versions of NUnit and so is to be preferred to the TestState value.

public static string TestName { get; }

The name of the currently executing test. If no test is running, the name of the last test run.