Class XunitTestRunner
The test runner for xUnit.net v3 tests.
public class XunitTestRunner : XunitTestRunnerBase<XunitTestRunnerContext, IXunitTest>
- Inheritance
-
XunitTestRunner
- Inherited Members
-
XunitTestRunnerBase<XunitTestRunnerContext, IXunitTest>.IsTestClassCreatable(XunitTestRunnerContext)TestRunner<XunitTestRunnerContext, IXunitTest>.IsTestClassDisposable(XunitTestRunnerContext, object)
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
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
testIXunitTestThe test that this invocation belongs to.
messageBusIMessageBusThe message bus to report run status to.
constructorArgumentsobject[]The arguments to be passed to the test class constructor.
explicitOptionExplicitOptionA flag to indicate how explicit tests should be treated.
aggregatorExceptionAggregatorThe exception aggregator used to run code and collect exceptions.
cancellationTokenSourceCancellationTokenSourceThe task cancellation token source, used to cancel the test run.
beforeAfterAttributesIReadOnlyCollection<IBeforeAfterTestAttribute>The list of IBeforeAfterTestAttributes for this test.
Returns
- ValueTask<RunSummary>
Returns summary information about the test that was run.