Class XunitTestCollectionRunner
The test collection runner for xUnit.net v3 tests.
public class XunitTestCollectionRunner : XunitTestCollectionRunnerBase<XunitTestCollectionRunnerContext, IXunitTestCollection, IXunitTestClass, IXunitTestCase>
- Inheritance
-
TestCollectionRunner<XunitTestCollectionRunnerContext, IXunitTestCollection, IXunitTestClass, IXunitTestCase>XunitTestCollectionRunnerBase<XunitTestCollectionRunnerContext, IXunitTestCollection, IXunitTestClass, IXunitTestCase>XunitTestCollectionRunner
- Inherited Members
Constructors
XunitTestCollectionRunner()
Initializes a new instance of the XunitTestCollectionRunner class.
protected XunitTestCollectionRunner()
Properties
Instance
Gets the singleton instance of XunitTestCollectionRunner.
public static XunitTestCollectionRunner Instance { get; }
Property Value
Methods
Run(IXunitTestCollection, IReadOnlyCollection<IXunitTestCase>, ExplicitOption, IMessageBus, ITestCaseOrderer, ExceptionAggregator, CancellationTokenSource, FixtureMappingManager)
Runs the test collection.
public ValueTask<RunSummary> Run(IXunitTestCollection testCollection, IReadOnlyCollection<IXunitTestCase> testCases, ExplicitOption explicitOption, IMessageBus messageBus, ITestCaseOrderer testCaseOrderer, ExceptionAggregator aggregator, CancellationTokenSource cancellationTokenSource, FixtureMappingManager assemblyFixtureMappings)
Parameters
testCollectionIXunitTestCollectionThe test collection to be run.
testCasesIReadOnlyCollection<IXunitTestCase>The test cases to be run. Cannot be empty.
explicitOptionExplicitOptionA flag to indicate how explicit tests should be treated.
messageBusIMessageBusThe message bus to report run status to.
testCaseOrdererITestCaseOrdererThe test case orderer that was applied at the assembly level.
aggregatorExceptionAggregatorThe exception aggregator used to run code and collection exceptions.
cancellationTokenSourceCancellationTokenSourceThe task cancellation token source, used to cancel the test run.
assemblyFixtureMappingsFixtureMappingManagerThe mapping manager for assembly fixtures.
Returns
RunTestClass(XunitTestCollectionRunnerContext, IXunitTestClass?, IReadOnlyCollection<IXunitTestCase>)
Override this method to run the tests in an individual test class.
protected override ValueTask<RunSummary> RunTestClass(XunitTestCollectionRunnerContext ctxt, IXunitTestClass? testClass, IReadOnlyCollection<IXunitTestCase> testCases)
Parameters
ctxtXunitTestCollectionRunnerContextThe context that describes the current test collection
testClassIXunitTestClassThe test class to be run. May be
nullfor test cases that do not support classes and methods.testCasesIReadOnlyCollection<IXunitTestCase>The test cases to be run.
Returns
- ValueTask<RunSummary>
Returns summary information about the tests that were run.