Class AssemblyRunner
- Namespace
- Xunit.Runners
- Assembly
- xunit.v3.runner.utility.netfx.dll
A class which makes it simpler for casual runner authors to find and run tests and get results.
public class AssemblyRunner : IAsyncDisposable, IMessageSink
- Inheritance
-
AssemblyRunner
- Implements
- Inherited Members
Properties
- OnDiagnosticMessage
Set to get notification of diagnostic messages.
- OnDiscoveryComplete
Set to get notification of when test discovery is complete.
- OnErrorMessage
Set to get notification of error messages (unhandled exceptions outside of tests).
- OnExecutionComplete
Set to get notification of when test execution is complete.
- OnInternalDiagnosticMessage
Set to get notification of internal diagnostic messages.
- OnTestFailed
Set to get notification of failed tests.
- OnTestFinished
Set to get notification of finished tests (regardless of outcome).
- OnTestOutput
Set to get real-time notification of test output (for xUnit.net v2 tests only). Note that output is captured and reported back to all the test completion Info>s in addition to being sent to this Info>.
- OnTestPassed
Set to get notification of passing tests.
- OnTestSkipped
Set to get notification of skipped tests.
- OnTestStarting
Set to get notification of when tests start running.
- Status
Gets the current status of the assembly runner
- TestCaseFilter
Set to be able to filter the test cases to decide which ones to run. If this is not set, then all test cases will be run.
Methods
- Cancel()
Call to request that the current run be cancelled. Note that cancellation may not be instantaneous, and even after cancellation has been acknowledged, you can expect to receive all the cleanup-related messages.
- DisposeAsync()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources asynchronously.
- OnMessage(IMessageSinkMessage)
Reports the presence of a message on the message bus. This method should never throw exceptions.
- Start(AssemblyRunnerStartOptions?)
Starts running tests. This call returns immediately, and status results are dispatched to the events on this class. Callers can check Status to find out the current status.
- WithAppDomain(string, string?, bool, string?)
Creates an assembly runner that discovers and run tests in a separate app domain.
- WithoutAppDomain(string)
Creates an assembly runner that discovers and runs tests without a separate app domain.