Table of Contents

Class XunitTestFrameworkExecutor

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

The implementation of ITestFrameworkExecutor that supports execution of unit tests linked against xunit.v3.core.dll.

public class XunitTestFrameworkExecutor : TestFrameworkExecutor<IXunitTestCase>, ITestFrameworkExecutor, IAsyncDisposable
Inheritance
XunitTestFrameworkExecutor
Implements
Inherited Members

Remarks

Initializes a new instance of the XunitTestFrameworkExecutor class.

Constructors

XunitTestFrameworkExecutor(IXunitTestAssembly)

The implementation of ITestFrameworkExecutor that supports execution of unit tests linked against xunit.v3.core.dll.

public XunitTestFrameworkExecutor(IXunitTestAssembly testAssembly)

Parameters

testAssembly IXunitTestAssembly

The test assembly.

Remarks

Initializes a new instance of the XunitTestFrameworkExecutor class.

Properties

TestAssembly

Gets the test assembly that contains the test.

protected IXunitTestAssembly TestAssembly { get; }

Property Value

IXunitTestAssembly

Methods

CreateDiscoverer()

Override to create a test framework discoverer that can be used to discover tests when the user asks to run all test.

protected override ITestFrameworkDiscoverer CreateDiscoverer()

Returns

ITestFrameworkDiscoverer

The test framework discoverer

RunTestCases(IReadOnlyCollection<IXunitTestCase>, IMessageSink, ITestFrameworkExecutionOptions, CancellationToken)

Runs selected test cases in the assembly.

public override ValueTask RunTestCases(IReadOnlyCollection<IXunitTestCase> testCases, IMessageSink executionMessageSink, ITestFrameworkExecutionOptions executionOptions, CancellationToken cancellationToken)

Parameters

testCases IReadOnlyCollection<IXunitTestCase>

The test cases to run.

executionMessageSink IMessageSink

The message sink to report results back to.

executionOptions ITestFrameworkExecutionOptions

The options to be used during test execution.

cancellationToken CancellationToken

The cancellation token which can be used to cancel the test execution process.

Returns

ValueTask