Table of Contents

Method Run

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

Run(IXunitTestClass, IReadOnlyCollection<IXunitTestCase>, ExplicitOption, IMessageBus, ITestCaseOrderer, ExceptionAggregator, CancellationTokenSource, FixtureMappingManager)

Runs the test class.

public ValueTask<RunSummary> Run(IXunitTestClass testClass, IReadOnlyCollection<IXunitTestCase> testCases, ExplicitOption explicitOption, IMessageBus messageBus, ITestCaseOrderer testCaseOrderer, ExceptionAggregator aggregator, CancellationTokenSource cancellationTokenSource, FixtureMappingManager collectionFixtureMappings)

Parameters

testClass

The test class to be run.

testCases IReadOnlyCollection<IXunitTestCase>

The test cases to be run. Cannot be empty.

explicitOption

A flag to indicate how explicit tests should be treated.

messageBus

The message bus to report run status to.

testCaseOrderer

The test case orderer that will be used to decide how to order the test.

aggregator

The exception aggregator used to run code and collect exceptions.

cancellationTokenSource CancellationTokenSource

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

collectionFixtureMappings

The mapping of collection fixture types to fixtures.

Returns

ValueTask<RunSummary>