ITestHostLauncher Interface
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Allows an extension to control how the out-of-process test host is launched, replacing the
platform's default Process.Start behavior.
public interface ITestHostLauncher : Microsoft.Testing.Platform.Extensions.TestHostControllers.ITestHostControllersExtension
type ITestHostLauncher = interface
interface ITestHostControllersExtension
interface IExtension
Public Interface ITestHostLauncher
Implements ITestHostControllersExtension
- Implements
Remarks
The platform keeps owning everything around the launch — argument and environment preparation, the controller-to-host IPC pipe, the PID handshake, ITestHostProcessLifetimeHandler callbacks, and exit-code reconciliation — and delegates only the single "create and start the test host" step to the registered launcher. The launcher does not have to start a local OS process: it can deploy and activate a packaged application, launch a container, or start the host on a remote machine, as long as it returns an ITestHostHandle the platform can monitor.
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 |
|---|---|
| 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) |
| LaunchTestHostAsync(TestHostLaunchContext, CancellationToken) |
Creates and starts the test host. The platform has already prepared the file name,
arguments, and environment variables (including the controller IPC pipe name) carried by
|