Table of Contents

Class OutOfProcessTestProcessLauncherBase

Namespace
Xunit.v3
Assembly
xunit.v3.runner.utility.netfx.dll

Base implementation of ITestProcessLauncher designed to launch an xUnit.net v3 test project out of process (the default behavior). The base class abstracts away the actual launch and manipulation, so that replacement launchers to perform things like launching under a debugger.

public abstract class OutOfProcessTestProcessLauncherBase : ITestProcessLauncher
Inheritance
OutOfProcessTestProcessLauncherBase
Implements
Derived
Inherited Members

Properties

IsWindows

Return true if running under Windows; return false if running elsewhere (and Mono is required for .NET Framework support). By default uses RuntimeInformation.

public virtual bool IsWindows { get; }

Property Value

bool

Methods

Launch(XunitProjectAssembly, IReadOnlyList<string>)

Launches the test process. Returns null if the process could not be launched.

public ITestProcess? Launch(XunitProjectAssembly projectAssembly, IReadOnlyList<string> arguments)

Parameters

projectAssembly XunitProjectAssembly

The test project assembly

arguments IReadOnlyList<string>

The list of arguments to be passed to the in-process runner

Returns

ITestProcess

StartTestProcess(string, string, string?)

Starts the test process.

protected abstract ITestProcess? StartTestProcess(string executable, string executableArguments, string? responseFile)

Parameters

executable string

The executable to be launched (note that this may not be a fully qualified path name, as it may be depending on the system path to locate the executable)

executableArguments string

The arguments to pass to the executable

responseFile string

The response file that's being used, if present

Returns

ITestProcess

Remarks

The response file will be part of the executableArguments, but the actual path to the response file is provided here in the even that it needs to be modified or copied elsewhere (at which point the developer is responsible for updating executableArguments to point to the new response file location). Additionally, the developer is responsible for deleting the response file from the disk when the execution is complete.