Table of Contents

Class XunitTestRunner

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

The test runner for xUnit.net v3 tests.

public class XunitTestRunner : XunitTestRunnerBase<XunitTestRunnerContext, IXunitTest>
Inheritance
XunitTestRunner
Inherited Members

Constructors

XunitTestRunner()

Initializes a new instance of the XunitTestRunner class.

protected XunitTestRunner()

Fields

Instance

Gets the singleton instance of the XunitTestRunner.

public static XunitTestRunner Instance

Field Value

XunitTestRunner

Methods

Run(IXunitTest, IMessageBus, object?[], ExplicitOption, ExceptionAggregator, CancellationTokenSource, IReadOnlyCollection<IBeforeAfterTestAttribute>)

Runs the test.

public ValueTask<RunSummary> Run(IXunitTest test, IMessageBus messageBus, object?[] constructorArguments, ExplicitOption explicitOption, ExceptionAggregator aggregator, CancellationTokenSource cancellationTokenSource, IReadOnlyCollection<IBeforeAfterTestAttribute> beforeAfterAttributes)

Parameters

test IXunitTest

The test that this invocation belongs to.

messageBus IMessageBus

The message bus to report run status to.

constructorArguments object[]

The arguments to be passed to the test class constructor.

explicitOption ExplicitOption

A flag to indicate how explicit tests should be treated.

aggregator ExceptionAggregator

The exception aggregator used to run code and collect exceptions.

cancellationTokenSource CancellationTokenSource

The task cancellation token source, used to cancel the test run.

beforeAfterAttributes IReadOnlyCollection<IBeforeAfterTestAttribute>

The list of IBeforeAfterTestAttributes for this test.

Returns

ValueTask<RunSummary>

Returns summary information about the test that was run.