ITestHostLauncher.LaunchTestHostAsync Method
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.
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
context. The implementation must return a handle the platform can
monitor for completion.
public System.Threading.Tasks.Task<Microsoft.Testing.Platform.Extensions.TestHostControllers.ITestHostHandle> LaunchTestHostAsync(Microsoft.Testing.Platform.Extensions.TestHostControllers.TestHostLaunchContext context, System.Threading.CancellationToken cancellationToken);
abstract member LaunchTestHostAsync : Microsoft.Testing.Platform.Extensions.TestHostControllers.TestHostLaunchContext * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Testing.Platform.Extensions.TestHostControllers.ITestHostHandle>
Public Function LaunchTestHostAsync (context As TestHostLaunchContext, cancellationToken As CancellationToken) As Task(Of ITestHostHandle)
Parameters
- context
- TestHostLaunchContext
The fully prepared launch information.
- cancellationToken
- CancellationToken
The cancellation token.
Returns
A handle the platform monitors for the lifetime of the test host.