Dot Cover Build Step
A dotCover build step to run dotCover – .NET code coverage tool
Example. Runs dotCover cover
command for a provided command line and generate report by running dotCover report
command
buildType {
// Other Build Type settings ...
steps {
// Other Build Steps ...
dotCover {
executable = "/path/to/dotnet"
commandLineArguments = "test MyProjectTests.dll"
}
Content copied to clipboard }
}
Example. Runs dotCover cover
command for a provided command line and passes additinal command-line arguments
buildType {
// Other Build Type settings ...
steps {
// Other Build Steps ...
dotCover {
executable = "/path/to/dotnet"
commandLineArguments = "test MyProjectTests.dll"
coverArguments = "--Output=/path/to/MyProjectTests.dcvr"
generateReport = "false"
}
Content copied to clipboard }
}
Example. Runs dotCover merge
command for provided additional snapshots paths and then generate report by running dotCover report
command
buildType {
// Other Build Type settings ...
steps {
// Other Build Steps ...
dotCover {
snapshotPaths = """
/path/to/MyProject1Tests.dcvr
/path/to/MyProject2Tests.dcvr
/path/to/MyProject3Tests.dcvr
""".trimIndent()
}
Content copied to clipboard }
}
See also
Properties
Specify a new-line separated list of filters for code coverage
Specify a new-line separated list of attribute filters for code coverage. Supported only with dotCover 2.0 or later
Space or new-line separated command line parameters for covering process
Optional collection of build step execution conditions
Enter additional new-line separated command line parameters for dotCover cover
command
Specifies which Docker image to use for running this build step. I.e. the build step will be run inside specified docker image, using 'docker run' wrapper.
Specifies which Docker image platform will be used to run this build step.
If enabled, "pull image" command will be run before docker run.
Additional docker run command arguments
Specify path to an executable file to run the process under dotCover coverage profile and produce a dotCover snapshot file. This parameter is optional
Build step execution mode
Generates a TeamCity coverage report that will be displayed on the Code Coverage tab after the build is complete. Default value is true
Specify dotCover snapshot (.dcvr) files paths separated by spaces or new lines. Wildcards are supported. Note that you can merge snapshots generated only by the selected or earlier version of dotCover tool
Functions
Deletes all configured build step conditions
Configures build step conditions
Copies parameters of this object to the specified target
Validates this object and reports found errors to the provided consumer