Class TestFrameworkExecutor<TTestCase>
A reusable implementation of ITestFrameworkExecutor which contains the basic behavior for running tests.
public abstract class TestFrameworkExecutor<TTestCase> : ITestFrameworkExecutor, IAsyncDisposable where TTestCase : ITestCase
Type Parameters
TTestCaseThe type of the test case used by the test framework. Must derive from ITestCase.
- Inheritance
-
TestFrameworkExecutor<TTestCase>
- Implements
- Derived
- Inherited Members
Constructors
TestFrameworkExecutor(ITestAssembly)
A reusable implementation of ITestFrameworkExecutor which contains the basic behavior for running tests.
protected TestFrameworkExecutor(ITestAssembly testAssembly)
Parameters
testAssemblyITestAssemblyThe test assembly.
Properties
DisposalTracker
Gets the disposal tracker for the test framework discoverer.
protected DisposalTracker DisposalTracker { get; }
Property Value
TestAssembly
Gets the test assembly for execution.
protected ITestAssembly TestAssembly { get; }
Property Value
Methods
CreateDiscoverer()
Override to create a test framework discoverer that can be used to discover tests when the user asks to run all test.
protected abstract ITestFrameworkDiscoverer CreateDiscoverer()
Returns
- ITestFrameworkDiscoverer
The test framework discoverer
DisposeAsync()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources asynchronously.
public virtual ValueTask DisposeAsync()
Returns
RunTestCases(IReadOnlyCollection<TTestCase>, IMessageSink, ITestFrameworkExecutionOptions, CancellationToken)
Runs selected test cases in the assembly.
public abstract ValueTask RunTestCases(IReadOnlyCollection<TTestCase> testCases, IMessageSink executionMessageSink, ITestFrameworkExecutionOptions executionOptions, CancellationToken cancellationToken)
Parameters
testCasesIReadOnlyCollection<TTestCase>The test cases to run.
executionMessageSinkIMessageSinkThe message sink to report results back to.
executionOptionsITestFrameworkExecutionOptionsThe options to be used during test execution.
cancellationTokenCancellationTokenThe cancellation token which can be used to cancel the test execution process.