This is part of the Fake.DotNet.Cli module.

TestOptions

dotnet test command options

Record Fields

Record FieldDescription
Blame
Signature: bool

Runs the tests in blame mode. This option is helpful in isolating the problematic tests causing test host to crash. It creates an output file in the current directory as Sequence.xml that captures the order of tests execution before the crash. (--blame)

Collect
Signature: string option

Enables data collector for the test run. More info here : https://aka.ms/vstest-collect (--collect)

Common
Signature: Options

Common tool options

Configuration
Signature: BuildConfiguration

Configuration to use for building the project. Default for most projects is "Debug". (--configuration)

Diag
Signature: string option

Enable verbose logs for test platform. Logs are written to the provided file. (--diag)

Filter
Signature: string option

Run tests that match the given expression. (--filter) Examples: Run tests with priority set to 1: --filter "Priority = 1" Run a test with the specified full name: --filter "FullyQualifiedName=Namespace.ClassName.MethodName" Run tests that contain the specified name: --filter "FullyQualifiedName~Namespace.Class" More info on filtering support: https://aka.ms/vstest-filtering

Framework
Signature: string option

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

ListTests
Signature: bool

Lists discovered tests (--list-tests)

Logger
Signature: string option

Specify a logger for test results. (--logger)

MSBuildParams
Signature: CliArguments

Other msbuild specific parameters

NoBuild
Signature: bool

Do not build project before testing. (--no-build)

NoLogo
Signature: bool

Don't show copyright messages. (--nologo)

NoRestore
Signature: bool

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

Output
Signature: string option

Directory in which to find the binaries to be run (--output)

ResultsDirectory
Signature: 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)

RunSettingsArguments
Signature: string option

Arguments to pass runsettings configurations through commandline. Arguments may be specified as name-value pair of the form [name]=[value] after "-- ". Note the space after --.

Settings
Signature: string option

Settings to use when running tests (--settings)

TestAdapterPath
Signature: string option

Use custom adapters from the given path in the test run. (--test-adapter-path)

Instance members

Instance memberDescription
x.Environment
Signature: Map<string,string>

Gets the current environment

x.WithCommon(f)
Signature: (f:(Options -> Options)) -> TestOptions
Modifiers: inline

Changes the "Common" properties according to the given function

x.WithEnvironment(map)
Signature: map:Map<string,string> -> TestOptions

Sets the current environment variables.

x.WithRedirectOutput(shouldRedirect)
Signature: shouldRedirect:bool -> TestOptions

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

Static members

Static memberDescription
TestOptions.Create()
Signature: unit -> TestOptions

Parameter default values.

TestOptions.Default
Signature: TestOptions
Attributes:
[<Obsolete("Use TestOptions.Create instead")>]
OBSOLETE

Use TestOptions.Create instead