Table of Contents

Interface ITestFramework

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

Represents a test framework. There are two pieces to test frameworks: discovery and execution. The two factory methods represent these two pieces. Test frameworks may optionally implement either IDisposable or IAsyncDisposable. They may implement a constructor which is either empty, or takes a single IMessageSink for diagnostic messages, or takes two instances of IMessageSink for diagnostic messages and internal diagnostic messages, respectively.

public interface ITestFramework

Properties

TestFrameworkDisplayName

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

string TestFrameworkDisplayName { get; }

Property Value

string

Methods

GetDiscoverer(Assembly)

Get a test discoverer.

ITestFrameworkDiscoverer GetDiscoverer(Assembly assembly)

Parameters

assembly Assembly

The assembly to discover tests from.

Returns

ITestFrameworkDiscoverer

The test discoverer.

GetExecutor(Assembly)

Get a test executor.

ITestFrameworkExecutor GetExecutor(Assembly assembly)

Parameters

assembly Assembly

The assembly to run tests from.

Returns

ITestFrameworkExecutor

The test executor.

SetTestPipelineStartup(ITestPipelineStartup)

Will be invoked by the test pipeline when the user has provided a startup class. Test frameworks may choose to use this in any way they see fit.

void SetTestPipelineStartup(ITestPipelineStartup pipelineStartup)

Parameters

pipelineStartup ITestPipelineStartup