Method FindAndRun
- Namespace
- Xunit.v3
- Assembly
- xunit.v3.core.dll
FindAndRun(IMessageSink, ITestFrameworkDiscoveryOptions, ITestFrameworkExecutionOptions, Func<ITestCase, bool>, Type[]?)
Starts the process of finding and running tests in an assembly. Typically only used by runner which do not present test discovery UIs to users that allow them to run selected tests (those should instead use Find(IMessageSink?, ITestFrameworkDiscoveryOptions, Func<ITestCase, bool>, Type[]?, Func<ITestCase, bool, ValueTask<bool>>?) and Run(IMessageSink, ITestFrameworkExecutionOptions, IReadOnlyCollection<ITestCase>) as separate operations).
public ValueTask FindAndRun(IMessageSink messageSink, ITestFrameworkDiscoveryOptions discoveryOptions, ITestFrameworkExecutionOptions executionOptions, Func<ITestCase, bool> filter, Type[]? types = null)
Parameters
messageSinkThe message sink to report messages to.
discoveryOptionsThe options to be used for discovery.
executionOptionsThe options to be used for execution.
filterFunc<ITestCase, bool>The filter function for filtering test cases.
typesType[]When passed a non-
nullcollection, discovery/filtering/execution only looks for tests from one of the provided types; when passed anullcollection, discovery/filtering/execution looks at all types in the assembly.