Table of Contents

Method Run

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

Run(IXunitTestMethod, IReadOnlyCollection<IXunitTestCase>, ExplicitOption, IMessageBus, ExceptionAggregator, CancellationTokenSource, object?[])

Runs the test test method.

public ValueTask<RunSummary> Run(IXunitTestMethod testMethod, IReadOnlyCollection<IXunitTestCase> testCases, ExplicitOption explicitOption, IMessageBus messageBus, ExceptionAggregator aggregator, CancellationTokenSource cancellationTokenSource, object?[] constructorArguments)

Parameters

testMethod

The test method 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.

aggregator

The exception aggregator used to run code and collect exceptions.

cancellationTokenSource CancellationTokenSource

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

constructorArguments object[]

The constructor arguments for the test class.

Returns

ValueTask<RunSummary>