Table of Contents

Class DotNetTestingPlatformConfig

Namespace
DotNetDo
Assembly
DotNetDo.Core.dll

Options for dotnet test in a repository that runs tests with Microsoft.Testing.Platform.

public sealed record DotNetTestingPlatformConfig : IEquatable<DotNetTestingPlatformConfig>

Remarks

Report options belong to Microsoft.Testing.Platform extensions and are passed to the test applications after --. Each test project must reference the extension package that provides a report option, or the test application rejects it. Additional arguments follow the report options.

Properties

AffectedTests

Runs only tests affected by a change; experimental and requires a separately distributed extension.

public bool AffectedTests { get; init; }

Property Value

bool

CollectTestMap

Collects a repository test map; experimental and requires a separately distributed extension.

public bool CollectTestMap { get; init; }

Property Value

bool

ConfigFile

The testconfig.json file used for test execution.

public string? ConfigFile { get; init; }

Property Value

string?

CurrentRuntime

Uses the current runtime as the target runtime during restore and build.

public bool CurrentRuntime { get; init; }

Property Value

bool

Device

The device, emulator, or simulator used for mobile or Apple-platform test projects.

public string? Device { get; init; }

Property Value

string?

DiagnosticOutputDirectory

The directory where diagnostic output is stored.

public string? DiagnosticOutputDirectory { get; init; }

Property Value

string?

ListDevices

Lists available devices for a project without running tests.

public bool ListDevices { get; init; }

Property Value

bool

ListTestsFormat

Lists discovered tests in this format without executing them.

public TestingPlatformListFormat? ListTestsFormat { get; init; }

Property Value

TestingPlatformListFormat?

MaximumFailedTests

Stops the run after this many failed, errored, timed-out, or canceled tests.

public int? MaximumFailedTests { get; init; }

Property Value

int?

MaxParallelTestModules

The maximum number of test modules that run in parallel.

public int? MaxParallelTestModules { get; init; }

Property Value

int?

MinimumExpectedTests

Fails the run when fewer tests than this run across all test modules.

public int? MinimumExpectedTests { get; init; }

Property Value

int?

NoAnsi

Disables ANSI escape characters in console output.

public bool NoAnsi { get; init; }

Property Value

bool

NoArtifactPostProcessing

Disables combining compatible artifacts, such as reports, after a multi-module run.

public bool NoArtifactPostProcessing { get; init; }

Property Value

bool

NoDependencies

Skips building project-to-project references.

public bool NoDependencies { get; init; }

Property Value

bool

NoLaunchProfile

Ignores launchSettings.json when running test applications.

public bool NoLaunchProfile { get; init; }

Property Value

bool

NoLaunchProfileArguments

Ignores launch-profile command-line arguments when running test applications.

public bool NoLaunchProfileArguments { get; init; }

Property Value

bool

NoProgress

Disables progress reporting in console output.

public bool NoProgress { get; init; }

Property Value

bool

Output

The detail level of test result output.

public TestingPlatformOutput? Output { get; init; }

Property Value

TestingPlatformOutput?

PublishAzureDevOpsRunName

The Azure DevOps test run name used when publishing results.

public string? PublishAzureDevOpsRunName { get; init; }

Property Value

string?

PublishAzureDevOpsTestResults

Streams results to an Azure DevOps test run shown on the build's Tests tab; requires SYSTEM_ACCESSTOKEN.

public bool PublishAzureDevOpsTestResults { get; init; }

Property Value

bool

ReportAzureDevOps

Reports errors, warnings, and test annotations to Azure Pipelines; requires Microsoft.Testing.Extensions.AzureDevOpsReport.

public bool ReportAzureDevOps { get; init; }

Property Value

bool

ReportAzureDevOpsAnnotations

Whether failed and skipped tests produce Azure Pipelines annotations.

public bool? ReportAzureDevOpsAnnotations { get; init; }

Property Value

bool?

ReportAzureDevOpsDemoteKnownFlaky

Reports failures that are flaky in the Azure DevOps history window as warnings.

public bool ReportAzureDevOpsDemoteKnownFlaky { get; init; }

Property Value

bool

ReportAzureDevOpsFlakyHistory

The number of days, from 1 through 90, of Azure DevOps test history used to annotate flaky failures.

public int? ReportAzureDevOpsFlakyHistory { get; init; }

Property Value

int?

ReportAzureDevOpsGroups

Whether each test assembly's output appears in a collapsible Azure Pipelines log group.

public bool? ReportAzureDevOpsGroups { get; init; }

Property Value

bool?

ReportAzureDevOpsQuarantineFile

A text file listing quarantined test names or glob patterns whose failures are reported as warnings.

public string? ReportAzureDevOpsQuarantineFile { get; init; }

Property Value

string?

ReportAzureDevOpsSeverity

The severity used for reported Azure Pipelines events.

public TestingPlatformAzureDevOpsSeverity? ReportAzureDevOpsSeverity { get; init; }

Property Value

TestingPlatformAzureDevOpsSeverity?

ReportAzureDevOpsSlowTestHistory

The number of days, from 1 through 90, of Azure DevOps test history used to tune slow-test thresholds.

public int? ReportAzureDevOpsSlowTestHistory { get; init; }

Property Value

int?

ReportAzureDevOpsSlowTestHistoryMinSample

The minimum number of historical samples required before a test's history adjusts its slow-test threshold.

public int? ReportAzureDevOpsSlowTestHistoryMinSample { get; init; }

Property Value

int?

ReportAzureDevOpsSlowTestHistoryMultiplier

The multiplier applied to a test's historical p99 duration to calculate its slow-test threshold.

public double? ReportAzureDevOpsSlowTestHistoryMultiplier { get; init; }

Property Value

double?

ReportAzureDevOpsStackFrameFilters

Regular expressions for stack-frame type prefixes skipped when locating the call site to annotate.

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

Property Value

IReadOnlyList<string>

ReportAzureDevOpsSummary

Writes and uploads a Markdown job summary at the end of the test run.

public bool ReportAzureDevOpsSummary { get; init; }

Property Value

bool

ReportAzureDevOpsSummaryPath

Writes and uploads the Markdown job summary at this path instead of the default location.

public string? ReportAzureDevOpsSummaryPath { get; init; }

Property Value

string?

ReportAzureDevOpsUploadArtifactExclude

A glob, relative to the results directory, excluding files from upload.

public string? ReportAzureDevOpsUploadArtifactExclude { get; init; }

Property Value

string?

ReportAzureDevOpsUploadArtifactInclude

A glob, relative to the results directory, selecting files to upload.

public string? ReportAzureDevOpsUploadArtifactInclude { get; init; }

Property Value

string?

ReportAzureDevOpsUploadArtifactName

The Azure Pipelines artifact container name used for uploads.

public string? ReportAzureDevOpsUploadArtifactName { get; init; }

Property Value

string?

ReportAzureDevOpsUploadArtifacts

Uploads test result files, adds build tags, or both.

public TestingPlatformAzureDevOpsUpload? ReportAzureDevOpsUploadArtifacts { get; init; }

Property Value

TestingPlatformAzureDevOpsUpload?

ReportCtrf

Writes a Common Test Report Format JSON report; experimental and requires Microsoft.Testing.Extensions.CtrfReport.

public bool ReportCtrf { get; init; }

Property Value

bool

ReportCtrfFileName

The CTRF report file name, ending in .json.

public string? ReportCtrfFileName { get; init; }

Property Value

string?

ReportGitHub

Reports log groups, test annotations, a job summary, and slow-test notices to GitHub Actions; requires Microsoft.Testing.Extensions.GitHubActionsReport.

public bool ReportGitHub { get; init; }

Property Value

bool

Remarks

The reporter does nothing outside GitHub Actions, so it can stay enabled for local builds.

ReportGitHubAnnotations

Whether failed and skipped tests produce GitHub Actions annotations.

public bool? ReportGitHubAnnotations { get; init; }

Property Value

bool?

ReportGitHubFailureDetails

Whether the job summary includes bounded failure details.

public bool? ReportGitHubFailureDetails { get; init; }

Property Value

bool?

ReportGitHubGroups

Whether each test assembly's output appears in a collapsible GitHub Actions log group.

public bool? ReportGitHubGroups { get; init; }

Property Value

bool?

ReportGitHubHistory

A test-history snapshot file that the workflow restores before and saves after the run.

public string? ReportGitHubHistory { get; init; }

Property Value

string?

ReportGitHubHistoryWindow

The number of days, from 1 through 90, retained in the test-history snapshot.

public int? ReportGitHubHistoryWindow { get; init; }

Property Value

int?

ReportGitHubSlowTestNotices

Whether slow tests produce GitHub Actions notices.

public bool? ReportGitHubSlowTestNotices { get; init; }

Property Value

bool?

ReportGitHubSlowTestThreshold

The duration, such as 90s or 2m, after which a running test produces a slow-test notice.

public string? ReportGitHubSlowTestThreshold { get; init; }

Property Value

string?

ReportGitHubStepSummary

When the Markdown job summary is written.

public TestingPlatformGitHubStepSummary? ReportGitHubStepSummary { get; init; }

Property Value

TestingPlatformGitHubStepSummary?

ReportGitHubStepSummarySections

The content included in the Markdown job summary.

public TestingPlatformGitHubSummarySections? ReportGitHubStepSummarySections { get; init; }

Property Value

TestingPlatformGitHubSummarySections?

ReportHtml

Writes an HTML report; experimental and requires Microsoft.Testing.Extensions.HtmlReport.

public bool ReportHtml { get; init; }

Property Value

bool

ReportHtmlFileName

The HTML report file name, ending in .html.

public string? ReportHtmlFileName { get; init; }

Property Value

string?

ReportJUnit

Writes a JUnit XML report; experimental and requires Microsoft.Testing.Extensions.JUnitReport.

public bool ReportJUnit { get; init; }

Property Value

bool

ReportJUnitFileName

The JUnit XML report file name, ending in .xml.

public string? ReportJUnitFileName { get; init; }

Property Value

string?

ReportTrx

Writes a TRX report; requires Microsoft.Testing.Extensions.TrxReport.

public bool ReportTrx { get; init; }

Property Value

bool

ReportTrxFileName

The TRX report file name, which may use placeholders such as {asm}, {tfm}, and {arch}.

public string? ReportTrxFileName { get; init; }

Property Value

string?

ResultsDirectoryLayout

How a multi-module run organizes files under the results directory.

public TestingPlatformResultsLayout? ResultsDirectoryLayout { get; init; }

Property Value

TestingPlatformResultsLayout?

RootDirectory

The root directory used to resolve TestModules.

public string? RootDirectory { get; init; }

Property Value

string?

ShowTestResults

The test outcomes whose result blocks are shown; overrides Output.

public TestingPlatformOutcomes? ShowTestResults { get; init; }

Property Value

TestingPlatformOutcomes?

TestModules

Runs already-built test modules matching this glob expression instead of a solution or project.

public string? TestModules { get; init; }

Property Value

string?

Timeout

Stops the run after a duration such as 90s, 10m, or 2h.

public string? Timeout { get; init; }

Property Value

string?