Class OutOfProcessTestProcessLauncherBase
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
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
projectAssemblyXunitProjectAssemblyThe test project assembly
argumentsIReadOnlyList<string>The list of arguments to be passed to the in-process runner
Returns
StartTestProcess(string, string, string?)
Starts the test process.
protected abstract ITestProcess? StartTestProcess(string executable, string executableArguments, string? responseFile)
Parameters
executablestringThe 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)
executableArgumentsstringThe arguments to pass to the executable
responseFilestringThe response file that's being used, if present
Returns
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.