NUnit 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 ...
nunit {
nunitPath = "%teamcity.tool.NUnit.Console.DEFAULT%"
includeTests = """tests\*.dll"""
coverage = dotcover {
assemblyFilters = "+:*"
}
}
Content copied to clipboard }
}
See also
Constructors
Types
Properties
Optional collection of build step execution conditions
Specifies coverage tool to use
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.
NUnit version to use
A desired execution mode on a x64 machine
Whether TeamCity should run recently failed tests first to reduce test feedback
Whether TeamCity should run each assembly in a separate process. Works for NUnit versions prior to 3.0
A desired .NET Framework version
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