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

WorkItem

public abstract class WorkItem
A WorkItem may be an individual test case, a fixture or a higher level grouping of tests. All WorkItems inherit from the abstract WorkItem class, which uses the template pattern to allow derived classes to perform work in whatever way is needed. A WorkItem is created with a particular TestExecutionContext and is responsible for re-establishing that context in the current thread before it begins or resumes execution.
public List<ITestAction> Actions { get; }

The test actions to be performed before and after this test

public TestExecutionContext Context { get; }

The execution context

public bool IsParallelizable { get; }

Indicates whether this WorkItem may be run in parallel

public TestResult Result { get; protected set; }

The test result

public WorkItemState State { get; }

Gets the current state of the WorkItem

public Test Test { get; }

The test being executed by the work item

public string WorkerId { get; }

The unique id of the worker executing this item.

public event EventHandler Completed

Event triggered when the item is complete

public WorkItem(Test test)

Construct a WorkItem for a particular test.

public static WorkItem CreateWorkItem(ITest test, ITestFilter filter)

Creates a work item.

public virtual void Cancel(bool force)

Cancel (abort or stop) a WorkItem

public virtual void Execute()

Execute the current work item, including any child work items.

Initialize the TestExecutionContext. This must be done before executing the WorkItem.

protected abstract void PerformWork()

Method that performs actually performs the work. It should set the State to WorkItemState.Complete when done.

protected void WorkItemComplete()

Method called by the derived class when all work is complete