NUnit Console Step
A build step running NUnit tests
Example. Runs NUnit tests with help of the default NUnit console tool installed on the TeamCity server. Collects сode coverage with help of JetBrains DotCover and reports it to the TeamCity server together with the test results.
buildType {
// Other Build Type settings ...
steps {
// Other Build Steps ...
nunitConsole {
nunitPath = "%teamcity.tool.NUnit.Console.DEFAULT%"
includeTests = """tests\*.dll"""
coverage = dotcover {
assemblyFilters = "+:*"
}
}
Content copied to clipboard }
}
See also
Properties
Optional collection of build step execution conditions
Path to nunit configuration file.
Specifies coverage tool to use
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
Comma- or newline-separated list of NUnit categories which should be excluded. Category expressions are supported as well.
Comma- or newline-separated list of .NET assemblies which should be excluded from the list of found assemblies to test.
Build step execution mode
Comma- or newline-separated list of NUnit categories. Category expressions are supported as well.
Comma- or newline-separated list of .NET assemblies where the NUnit tests are specified relative to the checkout directory. Wildcards are supported.
Whether TeamCity should run recently failed tests first to reduce test feedback
Whether TeamCity should create *.nunit test project files for each test assemblies location
Build working directory for script, specify it if it is different from the checkout * directory.
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