FAKE - F# Make - A DSL for build tasks and more FAKE
6.2.0

Lookig for older versions of the documentation, pre FAKE v6? See 

v5.fake.build

DotNet.MTPTestOptions Type

dotnet test command options for the Microsoft.Testing.Platform runner, see DotNet.testMTP. With that runner dotnet test understands only a part of the options itself and passes the others to the test applications. Every test application understands the options of the platform. An option of a test framework or of an extension is rejected as an invalid command line by a test application that does not reference that framework or extension, and the test run fails; the documentation of each such field names what is needed.

Record fields

Record Field Description

ApplicationArguments

Full Usage: ApplicationArguments

Field type: string list

More arguments for the test applications, passed as they are after the options above. Use them for the options of a test framework or of an extension that have no field here, for example [ "--retry-failed-tests"; "3" ]. Arguments for dotnet test itself go to Options.CustomParams of MTPTestOptions.Common.

Field type: string list

Architecture

Full Usage: Architecture

Field type: string option

Target architecture, a shorthand that is combined with the runtime of the machine (--arch)

Field type: string option

CodeCoverage

Full Usage: CodeCoverage

Field type: MTPCodeCoverageOptions option

Collects code coverage. Needs the code coverage extension, see MTPCodeCoverageOptions. (--coverage)

Field type: MTPCodeCoverageOptions option

Common

Full Usage: Common

Field type: Options

Common tool options. Its Options.Verbosity is the verbosity of the build (--verbosity), and its Options.CustomParams are placed in front of all other arguments of dotnet test.

Field type: Options

ConfigFile

Full Usage: ConfigFile

Field type: string option

The testconfig.json file to use for the test run (--config-file)

Field type: string option

Configuration

Full Usage: Configuration

Field type: BuildConfiguration option

Configuration to use for building and running the tests, Debug for most projects when not set (--configuration)

Field type: BuildConfiguration option

CrashDump

Full Usage: CrashDump

Field type: MTPCrashDumpOptions option

Writes a memory dump when a test application crashes. Needs the crash dump extension, see MTPCrashDumpOptions. (--crashdump)

Field type: MTPCrashDumpOptions option

Diagnostic

Full Usage: Diagnostic

Field type: MTPDiagnosticOptions option

Makes the test applications write a diagnostic log. This is an option of the platform. (--diagnostic)

Field type: MTPDiagnosticOptions option

Filter

Full Usage: Filter

Field type: string option

Run the tests that match the given expression (--filter). This is an option of the test framework, not of the platform. MSTest and NUnit take the filter expressions of VSTest, see https://aka.ms/vstest-filtering. Other frameworks have their own options, for example --filter-class of xUnit.net v3; pass those through MTPTestOptions.ApplicationArguments.

Field type: string option

Framework

Full Usage: Framework

Field type: string option

Target framework to run the tests for. The target framework has to be specified in the project file. (--framework)

Field type: string option

HangDump

Full Usage: HangDump

Field type: MTPHangDumpOptions option

Writes a memory dump when a test application stops making progress. Needs the hang dump extension, see MTPHangDumpOptions. (--hangdump)

Field type: MTPHangDumpOptions option

IgnoreExitCodes

Full Usage: IgnoreExitCodes

Field type: int list

Exit codes of a test application that are not treated as a failure, for example 8 when a test application that runs no tests is fine. The codes are listed at https://aka.ms/testingplatform/exitcodes. This is an option of the platform. (--ignore-exit-code)

Field type: int list

ListTests

Full Usage: ListTests

Field type: bool

Lists the discovered tests instead of running them (--list-tests)

Field type: bool

MaxParallelTestModules

Full Usage: MaxParallelTestModules

Field type: int option

The maximum number of test applications that run in parallel, the number of processors when not set (--max-parallel-test-modules)

Field type: int option

MinimumExpectedTests

Full Usage: MinimumExpectedTests

Field type: int option

The minimum number of tests that have to run in the whole test run; with fewer tests the run fails with the exit code 9 (--minimum-expected-tests)

Field type: int option

NoAnsi

Full Usage: NoAnsi

Field type: bool

Disables ANSI escape characters in the output (--no-ansi)

Field type: bool

NoBuild

Full Usage: NoBuild

Field type: bool

Do not build the project before testing. Implies MTPTestOptions.NoRestore. (--no-build)

Field type: bool

NoLaunchProfile

Full Usage: NoLaunchProfile

Field type: bool

Do not use launchSettings.json to configure the test applications (--no-launch-profile)

Field type: bool

NoLaunchProfileArguments

Full Usage: NoLaunchProfileArguments

Field type: bool

Do not use the arguments that the launch profile specifies (--no-launch-profile-arguments)

Field type: bool

NoProgress

Full Usage: NoProgress

Field type: bool

Disables the progress indicator (--no-progress)

Field type: bool

NoRestore

Full Usage: NoRestore

Field type: bool

Does not do an implicit restore when executing the command (--no-restore)

Field type: bool

OS

Full Usage: OS

Field type: string option

Target operating system, a shorthand that is combined with the runtime of the machine (--os)

Field type: string option

Output

Full Usage: Output

Field type: MTPOutputVerbosity option

How much of the test results is printed (--output)

Field type: MTPOutputVerbosity option

Properties

Full Usage: Properties

Field type: (string * string) list

MSBuild properties for the evaluation and the build of the test projects (--property:name=value). There is no field for other MSBuild parameters, because dotnet test does not take them with this runner: it hands switches such as /nodeReuse:False over to the test applications, which reject them.

Field type: (string * string) list

ResultsDirectory

Full Usage: ResultsDirectory

Field type: string option

The directory where the test results are going to be placed. The specified directory will be created if it does not exist. (--results-directory)

Field type: string option

Runtime

Full Usage: Runtime

Field type: string option

Target runtime to run the tests for (--runtime)

Field type: string option

Timeout

Full Usage: Timeout

Field type: TimeSpan option

The time after which a test application stops its test run. This is an option of the platform, so the time is counted for every test application on its own. It is passed in whole seconds. Not to be confused with Options.Timeout of MTPTestOptions.Common, which kills the dotnet process. (--timeout)

Field type: TimeSpan option

TrxReport

Full Usage: TrxReport

Field type: MTPTrxReportOptions option

Writes a TRX report. Needs the TRX report extension, see MTPTrxReportOptions. (--report-trx)

Field type: MTPTrxReportOptions option

Instance members

Instance member Description

this.Environment

Full Usage: this.Environment

Returns: Map<string, string>

Gets the current environment

Returns: Map<string, string>

this.WithCommon

Full Usage: this.WithCommon

Parameters:
Returns: MTPTestOptions
Modifiers: inline

Changes the "Common" properties according to the given function

f : Options -> Options
Returns: MTPTestOptions

this.WithEnvironment

Full Usage: this.WithEnvironment

Parameters:
    map : Map<string, string>

Returns: MTPTestOptions

Sets the current environment variables.

map : Map<string, string>
Returns: MTPTestOptions

this.WithRedirectOutput

Full Usage: this.WithRedirectOutput

Parameters:
    shouldRedirect : bool

Returns: MTPTestOptions

Sets a value indicating whether the output for the given process is redirected.

shouldRedirect : bool
Returns: MTPTestOptions

Static members

Static member Description

MTPTestOptions.Create()

Full Usage: MTPTestOptions.Create()

Returns: MTPTestOptions

Parameter default values.

Returns: MTPTestOptions