Table of Contents

Class InProcessFrontController

Namespace
Xunit.v3
Assembly
xunit.v3.core.dll

This class is a "philosophical" implementation of IFrontController (which isn't a type that's available here), intended to be used by in-process runners, wrapped around an implementation of ITestFramework. The signatures of the methods are slightly different, as they permit and require direct access to ITestCase instances rather than forcing the test cases through a round of serialization and deserialization. It will also manufacture the IDiscoveryStarting and IDiscoveryComplete messages that the test framework is not responsible for. When connected to remote meta-runners, the in-process runner can convert ITestCase instances into TestCaseDiscovered instances by using a converter like v3.1.1.0:Xunit.Runner.Common.TestCaseExtensions.ToTestCaseDiscovered (which should be called from a callback passed to Find(IMessageSink?, ITestFrameworkDiscoveryOptions, Func<ITestCase, bool>, Type[]?, Func<ITestCase, bool, ValueTask<bool>>?)).

public class InProcessFrontController
Inheritance
InProcessFrontController
Inherited Members

Constructors

InProcessFrontController(ITestFramework, Assembly, string?)

Initializes a new instance of the InProcessFrontController class.

Properties

TestAssemblyUniqueID

Gets the unique ID for the test assembly provided to the discoverer.

TestFrameworkDisplayName

Returns the display name of the test framework that this discoverer is running tests for.

Methods

Find(IMessageSink?, ITestFrameworkDiscoveryOptions, Func<ITestCase, bool>, Type[]?, Func<ITestCase, bool, ValueTask<bool>>?)

Starts the process of finding tests in an assembly. Typically only used by runners which discover tests and present them into a UI for the user to interactively choose for selective run (via Run(IMessageSink, ITestFrameworkExecutionOptions, IReadOnlyCollection<ITestCase>)). For runners which simply wish to discover and immediately run tests, they should instead use FindAndRun(IMessageSink, ITestFrameworkDiscoveryOptions, ITestFrameworkExecutionOptions, Func<ITestCase, bool>, Type[]?), which permits the same filtering logic as this method.

FindAndRun(IMessageSink, ITestFrameworkDiscoveryOptions, ITestFrameworkExecutionOptions, Func<ITestCase, bool>, Type[]?)

Starts the process of finding and running tests in an assembly. Typically only used by runner which do not present test discovery UIs to users that allow them to run selected tests (those should instead use Find(IMessageSink?, ITestFrameworkDiscoveryOptions, Func<ITestCase, bool>, Type[]?, Func<ITestCase, bool, ValueTask<bool>>?) and Run(IMessageSink, ITestFrameworkExecutionOptions, IReadOnlyCollection<ITestCase>) as separate operations).

Run(IMessageSink, ITestFrameworkExecutionOptions, IReadOnlyCollection<ITestCase>)

Starts the process of running selected tests in the assembly. The test cases to run come from calling Find(IMessageSink?, ITestFrameworkDiscoveryOptions, Func<ITestCase, bool>, Type[]?, Func<ITestCase, bool, ValueTask<bool>>?) and collecting the test cases that were returned via the callback.