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

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 { [NullableContext(1)] public interface ITestAction { ActionTargets Targets { get; } void BeforeTest(ITest test); void AfterTest(ITest test); } }