Note: This API documentation is for FAKE version 4. The migration API documentation can be found here. The API documentation for the new fake 5 modules can be found here

ProcessTestRunner

Allows to execute processes as unit tests.

Nested types and modules

TypeDescription
ProcessTestRunnerParams

The ProcessTestRunner parameter type.

Functions and values

Function or valueDescription
ProcessTestRunnerDefaults
Signature: ProcessTestRunnerParams

The ProcessTestRunner defaults.

RunConsoleTest parameters fileName args
Signature: parameters:ProcessTestRunnerParams -> fileName:string -> args:string -> string option

Runs the given process and returns the process result.

runConsoleTests parameters processes
Signature: parameters:ProcessTestRunnerParams -> processes:seq<string * string> -> seq<string * string * string>

Runs the given processes and returns the process result messages.

RunConsoleTests setParams processes
Signature: setParams:(ProcessTestRunnerParams -> ProcessTestRunnerParams) -> processes:seq<string * string> -> unit

Runs the given processes and returns the process results.

Parameters

  • setParams - Function used to manipulate the default parameter value.
  • processes - Sequence of one or more filenames and arguments to run.

Sample usage

1: 
2: 
3: 
4: 
5: 
Target "Test" (fun _ ->
    ["process1.exe","argument1"
     "process2.exe","argument2"]
      |> RunConsoleTests (fun p -> {p with TimeOut = TimeSpan.FromMinutes 1. })
)