ITestHostProcessLifetimeHandler Interface

Definition

Represents an interface for handling the lifetime of the test host process.

public interface ITestHostProcessLifetimeHandler : Microsoft.Testing.Platform.Extensions.TestHostControllers.ITestHostControllersExtension
type ITestHostProcessLifetimeHandler = interface
    interface ITestHostControllersExtension
    interface IExtension
Public Interface ITestHostProcessLifetimeHandler
Implements ITestHostControllersExtension
Implements

Properties

Name Description
Description

Gets the description of the extension.

(Inherited from IExtension)
DisplayName

Gets the display name of the extension.

(Inherited from IExtension)
Uid

Gets the unique identifier for the extension.

(Inherited from IExtension)
Version

Gets the version of the extension (ideally semantic version).

(Inherited from IExtension)

Methods

Name Description
BeforeTestHostProcessStartAsync(CancellationToken)

Executes before the test host process starts.

IsEnabledAsync()

Controls whether the extension is enabled or not. This is useful for extensions that are always registered but only enabled when certain conditions are met. For example, an extension that would want to be run only when its associated command line option is provided by the user.

(Inherited from IExtension)
OnTestHostProcessExitedAsync(ITestHostProcessInformation, CancellationToken)

Executes when the test host process has exited.

OnTestHostProcessStartedAsync(ITestHostProcessInformation, CancellationToken)

Executes when the test host process has started.

Applies to