<PackageReference Include="NUnit" Version="3.0.0-alpha" />

AbstractTestAssemblyRunner

Abstract base used by NUnit and NUnitLite default ITestAssemblyRunners ///
protected TestExecutionContext Context { get; protected set; }

The TestExecutionContext for the top level WorkItem

public bool IsTestComplete { get; }

Indicates whether a test run is complete

public bool IsTestLoaded { get; }

Indicates whether a test is loaded

public bool IsTestRunning { get; }

Indicates whether a test is running

public ITest LoadedTest { get; }

The tree of tests that was loaded by the builder

public ITestResult Result { get; }

The test result, if a run has completed

protected IDictionary Settings { get; protected set; }

Our settings, specified when loading the assembly

protected WorkItem TopLevelWorkItem { get; protected set; }

The top level WorkItem created for the assembly as a whole

Initializes a new instance of the AbstractTestAssemblyRunner class.

public int CountTestCases(ITestFilter filter)

Count Test Cases using a filter

protected virtual void CreateTestExecutionContext(ITestListener listener)

Create the initial TestExecutionContext used to run tests

public ITest Load(string assemblyName, IDictionary settings)

Loads the tests found in an Assembly

public ITest Load(Assembly assembly, IDictionary settings)

Loads the tests found in an Assembly

protected virtual void OnRunCompleted(object sender, EventArgs e)

Handle the the Completed event for the top level work item

public ITestResult Run(ITestListener listener, ITestFilter filter)

Run selected tests and return a test result. The test is run synchronously, and the listener interface is notified as it progresses.

public void RunAsync(ITestListener listener, ITestFilter filter)

Run selected tests asynchronously, notifying the listener interface as it progresses.

public abstract void StartRun(ITestListener listener)

Initiate the test run

public void StopRun(bool force)

Signal any test run that is in process to stop. Return without error if no test is running.

public bool WaitForCompletion(int timeout)

Wait for the ongoing run to complete.