Table of Contents

Class DotNetTest

Namespace
DotNetDo
Assembly
DotNetDo.Core.dll

Builds selected test projects and runs their tests through the configured test platform.

public sealed record DotNetTest : DotNetTargetCommand, IEquatable<ExecOptions>, IEquatable<ToolCommand>, IEquatable<ToolCommand<ExecResult>>, IEquatable<ExecToolCommand>, IEquatable<DotNetTargetCommand>, IEquatable<DotNetTest>

Inheritance

Implements

Constructors

DotNetTest()

Creates a command with defaults for the current build locality.

public DotNetTest()

Properties

Architecture

Shorthand target architecture combined with the default runtime identifier.

public string? Architecture { get; init; }

Property Value

string?

ArtifactsPath

Places outputs for all projects beneath this artifacts root, separated by project.

public string? ArtifactsPath { get; init; }

Property Value

string?

Blame

Collects a sequence file identifying tests running near a crash or hang.

public bool Blame { get; init; }

Property Value

bool

BlameCrash

Collects a process dump when the test host crashes.

public bool BlameCrash { get; init; }

Property Value

bool

BlameCrashCollectAlways

Collects a crash dump even when the test host exits normally; requires crash blame.

public bool BlameCrashCollectAlways { get; init; }

Property Value

bool

BlameCrashDumpType

Selects mini or full crash dumps; requires crash blame.

public string? BlameCrashDumpType { get; init; }

Property Value

string?

BlameHang

Terminates and dumps a test host when a test exceeds the configured hang timeout.

public bool BlameHang { get; init; }

Property Value

bool

BlameHangDumpType

Selects mini, full, or none for hang dumps; requires hang blame.

public string? BlameHangDumpType { get; init; }

Property Value

string?

BlameHangTimeout

Sets the per-test hang timeout using a value such as 90s, 2m, or 1h.

public string? BlameHangTimeout { get; init; }

Property Value

string?

Collect

Enables the named data collector; collector settings may follow after a semicolon.

public string? Collect { get; init; }

Property Value

string?

CommandParts

Gets every canonically ordered rendered command fragment.

protected override IReadOnlyList<string?> CommandParts { get; }

Property Value

IReadOnlyList<string?>

Configuration

Selects the named build configuration.

public string? Configuration { get; init; }

Property Value

string?

Diag

Writes diagnostic test-platform logs to this file.

public string? Diag { get; init; }

Property Value

string?

DisableBuildServers

Prevents reuse of persistent build servers during this invocation.

public bool DisableBuildServers { get; init; }

Property Value

bool

Filter

Runs only tests matching the VSTest filter expression.

public string? Filter { get; init; }

Property Value

string?

Framework

Selects one target framework declared by the project.

public string? Framework { get; init; }

Property Value

string?

Interactive

Allows authentication and other operations to prompt for input.

public bool Interactive { get; init; }

Property Value

bool

ListTests

Discovers and lists tests without executing them.

public bool ListTests { get; init; }

Property Value

bool

Loggers

Enables test loggers; each value may include semicolon-delimited logger settings.

public IReadOnlyList<string> Loggers { get; init; }

Property Value

IReadOnlyList<string>

NoBuild

Skips building before the operation; required outputs must already exist.

public bool NoBuild { get; init; }

Property Value

bool

Suppresses the startup banner and copyright message.

public bool NoLogo { get; init; }

Property Value

bool

NoRestore

Skips implicit restore; assets must already be current.

public bool NoRestore { get; init; }

Property Value

bool

OperatingSystem

Shorthand target operating system combined with the default runtime identifier.

public string? OperatingSystem { get; init; }

Property Value

string?

Output

Places command outputs in the specified directory.

public string? Output { get; init; }

Property Value

string?

ResultsDirectory

Places test results and generated artifacts in this directory.

public string? ResultsDirectory { get; init; }

Property Value

string?

Runtime

Targets the specified runtime identifier, such as win-x64.

public string? Runtime { get; init; }

Property Value

string?

Settings

Uses this run-settings file to configure the test run.

public string? Settings { get; init; }

Property Value

string?

TestAdapterPath

Searches this directory for additional test adapters.

public string? TestAdapterPath { get; init; }

Property Value

string?

TestEnvironment

Sets test-host environment variables as NAME=VALUE; specifying any value runs tests in an isolated process.

public IReadOnlyList<string> TestEnvironment { get; init; }

Property Value

IReadOnlyList<string>