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

NUnit.Framework.Api.FrameworkController

FrameworkController provides a facade for use in loading, browsing and running tests without requiring a reference to the NUnit framework. All calls are encapsulated in constructors for this class and its nested classes, which only require the types of the Common Type System as arguments. The controller supports four actions: Load, Explore, Count and Run. They are intended to be called by a driver, which should allow for proper sequencing of calls. Load must be called before any of the other actions. The driver may support other actions, such as reload on run, by combining these calls.
namespace NUnit.Framework.Api { public class FrameworkController : LongLivedMarshalByRefObject { public abstract class FrameworkControllerAction : LongLivedMarshalByRefObject { protected FrameworkControllerAction(); } public class LoadTestsAction : FrameworkControllerAction { public LoadTestsAction(FrameworkController controller, object handler); } public class ExploreTestsAction : FrameworkControllerAction { public ExploreTestsAction(FrameworkController controller, string filter, object handler); } public class CountTestsAction : FrameworkControllerAction { public CountTestsAction(FrameworkController controller, string filter, object handler); } public class RunTestsAction : FrameworkControllerAction { public RunTestsAction(FrameworkController controller, string filter, object handler); } public class RunAsyncAction : FrameworkControllerAction { public RunAsyncAction(FrameworkController controller, string filter, object handler); } public class StopRunAction : FrameworkControllerAction { public StopRunAction(FrameworkController controller, bool force, object handler); } public ITestAssemblyBuilder Builder { get; } public ITestAssemblyRunner Runner { get; } public string AssemblyNameOrPath { get; } public FrameworkController(string assemblyNameOrPath, string idPrefix, IDictionary settings); public FrameworkController(Assembly assembly, string idPrefix, IDictionary settings); public FrameworkController(string assemblyNameOrPath, string idPrefix, IDictionary settings, string runnerType, string builderType); public FrameworkController(Assembly assembly, string idPrefix, IDictionary settings, string runnerType, string builderType); public string LoadTests(); public string ExploreTests(string filter); public string RunTests(string filter); public string RunTests(Action<string> callback, string filter); public void StopRun(bool force); public int CountTests(string filter); public static TNode InsertEnvironmentElement(TNode targetNode); public static TNode InsertSettingsElement(TNode targetNode, IDictionary<string, object> settings); } }