<PackageReference Include="NUnit" Version="4.2.1" />

ITestAction

public interface ITestAction
When implemented by an attribute, this interface implemented to provide actions to execute before and after tests.
using NUnit.Framework.Interfaces; using System.Runtime.CompilerServices; namespace NUnit.Framework { [System.Runtime.CompilerServices.NullableContext(1)] public interface ITestAction { ActionTargets Targets { get; } void BeforeTest(ITest test); void AfterTest(ITest test); } }