Dotnet Vs Test Step
A .NET vstest step to run .NET VSTest
Example. Runs dotnet vstest
command to run selected tests by names from the specified assemblies
buildType {
// Other Build Type settings ...
steps {
// Other Build Steps ...
dotnetVsTest {
assemblies = "path\to\assemblies\*.dll"
excludedAssemblies = "path\to\assemblies\ExcludedTests.dll"
version = DotnetVsTestStep.VSTestVersion.V17
filter = testName {
names = """
Test0
Test1
Test2
""".trimIndent()
}
settingsFile = "MyProjectTestsSettings.runsettings"
logging = DotnetVsTestStep.Verbosity.Normal
runInIsolation = true
platform = DotnetVsTestStep.Platform.x64
}
Content copied to clipboard }
}
See also
Types
Properties
Specify paths to test assemblies. Wildcards are supported.
Optional collection of build step execution conditions
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
Specify paths to excluded test assemblies. Wildcards are supported.
Build step execution mode
The filter type used while test run
Specify logging verbosity
Rerun failed tests until they pass or until the maximum number of attempts is reached.
Target platform architecture to be used for test execution
Whether TeamCity should run tests in an isolated process
The path to the run settings configuration file.
Whether TeamCity should run tests in a single session
VSTest version to use
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