Table of Contents

Namespace Xunit.Runner.Common

Classes

AfterTestFinished

Default implementation of IAfterTestFinished.

AfterTestStarting

Default implementation of IAfterTestStarting.

AggregateMessageSink

An implementation of IMessageSink which dispatches messages to one or more individual message sinks.

AppVeyorReporter

An implementation of IRunnerReporter that reports results to AppVeyor. This is auto-enabled by the presence of the "APPVEYOR_API_URL" environment variable, which points to the AppVeyor API endpoint that is used to report tests. It has no switch for manual enablement, since the API endpoint is required.

AppVeyorReporterMessageHandler

An implementation of IRunnerReporterMessageHandler that supports AppVeyorReporter.

AssemblyMetadata

Represents metadata about an assembly.

BeforeTestFinished

Default implementation of IBeforeTestFinished.

BeforeTestStarting

Default implementation of IBeforeTestStarting.

ConfigReader_Json

This class is used to read JSON-based configuration information for a test assembly.

ConfigUtility

Utilities for reading configuration values.

ConsoleDiagnosticMessageSink

Logs diagnostic messages to the system console.

ConsoleHelper

This class helps write colored text to the console. On Windows, it will use the built-in console functions; on Linux and macOS, it will use ANSI color codes.

ConsoleProjectLister

Helper class to list project contents out to Console.

ConsoleRunnerLogger

An implementation of IRunnerLogger which logs messages to a TextWriter (typically the one from Out).

DefaultRunnerReporter

The default implementation of IRunnerReporter, used by runners when there is no other overridden reporter. It returns an instance of DefaultRunnerReporterMessageHandler.

DefaultRunnerReporterMessageHandler

An implementation of IRunnerReporterMessageHandler that supports DefaultRunnerReporter.

DiagnosticEventSink

Class that maps diagnostic messages to events.

DiagnosticMessage

Default implementation of IDiagnosticMessage.

DiscoveryComplete

Default implementation of IDiscoveryComplete.

DiscoveryEventSink

Class that maps test framework discovery messages to events.

DiscoveryStarting

Default implementation of IDiscoveryStarting.

ErrorMessage

Default implementation of IErrorMessage.

ExecutionEventSink

Class that maps test framework execution messages to events.

ExecutionSink

This is the execution sink which most runners will use, which can perform several operations (including recording XML results, detecting long running tests, failing skipped tests, failing tests with warnings, and converting the top-level discovery and execution messages into their runner counterparts).

ExecutionSinkOptions

These are the options used when creating ExecutionSink. This is set up as an options class so that new options can be added without breaking binary compatibility.

ExecutionSummary

Collects execution totals for a group of test cases.

IRunnerLoggerExtensions

Extensions methods for IRunnerLogger.

InternalDiagnosticMessage

Default implementation of IInternalDiagnosticMessage.

JsonReporter

An implementation of IRunnerReporter that reports results as individual JSON objects on the console.

JsonReporterMessageHandler

An implementation of IRunnerReporterMessageHandler that supports JsonReporter.

LongRunningTestsSummary

Represents information about long running tests from ExecutionSink.

MessageHandlerArgs

Allows cancellation during message handling.

MessageHandlerArgs<TMessage>

Wraps a message with the ability to cancel execution.

MessageMetadataCache

Caches message metadata for xUnit.net v3 messages. The metadata which is cached depends on the message that is passed (for example, looking up with an ITestAssemblyMessage will return an IAssemblyMetadata). Storage methods require the "Starting" versions of messages (as these are the ones which contain the metadata), and removal methods require the "Finished" versions of messages.

MessageSinkMessage

Default implementation of IMessageSinkMessage, with serialization and deserialization support.

MessageSinkMessageDeserializer

A class which understands how to deserialize IMessageSinkMessage instances that are decorated with JsonTypeIDAttribute. The built-in messages are registered by default, and additional messages can be registered via RegisterMessageSinkMessageType(Type).

NullSourceInformationProvider

A null implementation of ISourceInformationProvider which always returns empty source information. Get the singleton via Instance.

QueryFilterParser

This class is used to parse a graphy query.

QuietReporter

An implementation of IRunnerReporter that emits only error or warning messages.

QuietReporterMessageHandler

An implementation of IRunnerReporterMessageHandler that supports QuietReporter.

RegisterRunnerReporterAttribute

Used to decorate xUnit.net test assemblies to indicate the availability of a custom runner reporter.

RegisteredRunnerReporters

Utility class for enumerating the runner reporters registered for the given assembly.

RunnerEventSink

Class that maps test runner messages to events.

SilentReporter

An implementation of IRunnerReporter that does not report any messages. Typically only used in context with the VSTest adapter, to prevent double reporting of messages

SilentReporterMessageHandler

An implementation of IRunnerReporterMessageHandler that supports SilentReporter.

StackFrameTransformer

Transforms stack frames and stack traces into compiler-like output so they can be double-clicked in Visual Studio.

TeamCityReporter

An implementation of IRunnerReporter that reports results to TeamCity. This is auto-enabled by the presence of the "TEAMCITY_PROJECT_NAME" environment variable.

TeamCityReporterMessageHandler

An implementation of IRunnerReporterMessageHandler that supports TeamCityReporter.

TestAssemblyCleanupFailure

Default implementation of ITestAssemblyCleanupFailure.

TestAssemblyConfiguration

Represents the configuration items set in the configuration file of a test assembly. Should be read with the ConfigReader class.

TestAssemblyDiscoveryFinished

Reports that runner has just finished discovery for a test assembly. This message will arrive after the test framework's IDiscoveryComplete message, and contains the project metadata associated with the discovery.

TestAssemblyDiscoveryStarting

Reports that runner is about to start discovery for a test assembly. This message will arrive before the test framework's Xunit.DiscoveryStarting message, and contains the project metadata associated with the discovery.

TestAssemblyExecutionFinished

Reports that runner is about to start execution for a test assembly. This message will arrive after the test framework's ITestAssemblyFinished message, and contains the project metadata associated with the execution.

TestAssemblyExecutionStarting

Reports that runner is about to start execution for a test assembly. This message will arrive before the test framework's ITestAssemblyStarting message, and contains the project metadata associated with the discovery.

TestAssemblyFinished

Default implementation of ITestAssemblyFinished.

TestAssemblyMessage

Default implementation of ITestAssemblyMessage.

TestAssemblyStarting

Default implementation of ITestAssemblyStarting.

TestCaseCleanupFailure

Default implementation of ITestCaseCleanupFailure.

TestCaseDiscovered

Default implementation of ITestCaseDiscovered.

TestCaseFinished

Default implementation of ITestCaseFinished.

TestCaseMessage

Default implementation of ITestCaseMessage.

TestCaseStarting

Default implementation of ITestCaseStarting.

TestClassCleanupFailure

Default implementation of ITestClassCleanupFailure.

TestClassConstructionFinished

Default implementation of ITestClassConstructionFinished.

TestClassConstructionStarting

Default implementation of ITestClassConstructionStarting.

TestClassDisposeFinished

Default implementation of ITestClassDisposeFinished.

TestClassDisposeStarting

Default implementation of ITestClassDisposeStarting.

TestClassFinished

Default implementation of ITestClassFinished

TestClassMessage

Default implementation of ITestClassMessage.

TestClassStarting

Default implementation of ITestClassStarting.

TestCleanupFailure

Default implementation of ITestCleanupFailure.

TestCollectionCleanupFailure

Default implementation of ITestCollectionCleanupFailure.

TestCollectionFinished

Default implementation of ITestCollectionFinished.

TestCollectionMessage

Default implementation of ITestCollectionMessage.

TestCollectionStarting

Default implementation of ITestCollectionStarting.

TestDiscoverySink

An implementation of IMessageSink designed for test discovery for a single test assembly. The Finished event is triggered when discovery is complete.

TestExecutionSummaries

Reports multi-assembly test execution summary information.

TestFailed

Default implementation of ITestFailed.

TestFinished

Default implementation of ITestFinished.

TestFrameworkOptions

Represents options passed to a test framework for discovery or execution.

TestMessage

Default implementation of ITestMessage.

TestMessageSink

An implementation of IMessageSink that provides access to events for all levels of reporting.

TestMethodCleanupFailure

Default implementation of ITestMethodCleanupFailure.

TestMethodFinished

Default implementation of ITestMethodFinished.

TestMethodMessage

Default implementation of ITestMethodMessage.

TestMethodStarting

Default implementation of ITestMethodStarting.

TestNotRun

Default implementation of ITestNotRun.

TestOutput

Default implementation of ITestOutput.

TestPassed

Default implementation of ITestPassed.

TestProjectConfiguration

Represents the configuration settings for a test runner which are independent of the test assembly. Are usually passed via command line or some other equivalent mechanism. Accessed via XunitProject.Configuration.

TestResultMessage

Default implementation of ITestResultMessage.

TestSkipped

Default implementation of ITestSkipped.

TestStarting

Default implementation of ITestStarting.

Transform

Represents a single report transformation from XML.

TransformFactory

Used to retrieve a list of available

VerboseReporter

An implementation of IRunnerReporter that supplements the default reporter behavior by printing out the start and finish of each executing test.

VerboseReporterMessageHandler

An implementation of IRunnerReporterMessageHandler that supports VerboseReporter.

VstsReporter

An implementation of IRunnerReporter that reports results to Azure DevOps/VSTS. This is auto-enabled by the presence of four required environment variables: "VSTS_ACCESS_TOKEN", "SYSTEM_TEAMFOUNDATIONCOLLECTIONURI", "SYSTEM_TEAMPROJECT", and "BUILD_BUILDID".

VstsReporterMessageHandler

An implementation of IRunnerReporterMessageHandler that supports VstsReporter.

XunitFilters

Represents the ability to track query filters or simple filters. Any attempt to add a mix of the two will result in an exception.

XunitProject

Represents a project which contains zero or more test assemblies, as well as global (cross-assembly) configuration settings.

XunitProjectAssembly

Represents an assembly in an XunitProject.

Structs

SourceInformation

Source information returned by ISourceInformationProvider.

StackFrameInfo

Represents the top of a stack frame, typically taken from an exception or failure information.

Interfaces

IRegisterRunnerReporterAttribute

Used to decorate xUnit.net test assemblies to indicate the availability of a custom runner reporter.

IRunnerLogger

Interface implemented by runners, passed to IRunnerReporter, so that the report can log lines of text to the output device.

IRunnerReporter

This interface represents a reporter which is invoked by a test runner during test execution. The report can be explicitly invoked by a command line switch or implicitly invoked by being environmentally enabled (for example, a reporter that emits messages for TeamCity).

IRunnerReporterMessageHandler

Indicates a message sink that's designed for use with runner reporters. In particular, this allows runner reporters to implement IAsyncDisposable and forces runners to dispose of the message handler that's returned to them.

ISourceInformationProvider

Represents a provider which gives source line information for a test case after discovery has completed. This is typically provided by a third party runner (for example, the VSTest plugin provides this via DiaSession from Visual Studio). It's used to supplement test case metadata when the discovery process itself cannot provide source file and line information.

ITestCaseFilter

Represents a filter run against a test case (and the associated assembly it resides in).

Enums

AppDomainOption

Indicates the current level of app domain support that's in effect, for use by runner reporters.

AppDomainSupport

Indicates the level of app domain support that the runner is requesting. Note that these values are only valid for v1 and v2 tests; v3 tests always run in a separate process rather than in the runner process.

ListFormat

Designates the format that the test list should take.

ListOption

Indicates the kind of list a runner should generate, rather than running tests.

ParallelismOption

Represents available parallelism options

TargetFrameworkIdentifier

Represents the target framework identifier that an assembly is targeting

Delegates

MessageHandler<TMessage>

Represents a handler for a message, which includes the ability to signal that tests should stop running.