Class DotnetTestAndStageOptions
- Namespace
- Invex.Atom.Module.Dotnet.Helpers
- Assembly
- Invex.Atom.Module.Dotnet.dll
Represents options for the DotnetTestAndStage(RootedPath, DotnetTestAndStageOptions?, CancellationToken) operation.
public sealed record DotnetTestAndStageOptions
- Inheritance
-
objectDotnetTestAndStageOptions
Constructors
DotnetTestAndStageOptions()
public DotnetTestAndStageOptions()
Properties
CustomPropertiesTransform
Gets or sets a custom transformation function to apply to project property files before running tests.
public Func<string, string>? CustomPropertiesTransform { get; init; }
Property Value
- Func<string, string>
Remarks
This function can be used to modify the content of .csproj or .props files
(e.g., to inject custom properties or modify existing ones) during the testing process.
IncludeCoverage
Gets or sets a value indicating whether to include code coverage generation and reporting.
public bool IncludeCoverage { get; init; }
Property Value
- bool
Remarks
If true, the dotnet test command will be configured to collect code coverage,
and a code coverage report will be generated and added to the build report.
Defaults to true.
SetVersionsFromProviders
Gets or sets a value indicating whether to automatically set project versions from the build version providers (BuildVersion).
public bool SetVersionsFromProviders { get; init; }
Property Value
- bool
Remarks
If true, the module will attempt to inject the build version into project files
before running tests. Defaults to true.
TestOptions
Gets or sets the specific options to pass to the dotnet test command.
public DotnetTestOptions? TestOptions { get; init; }