Icon

You are viewing the documentation of TeamCity 10.x and 2017.x, which is not the most recently released version of TeamCity.
View this page in the latest documentation or refer to the listing to choose the documentation corresponding to your TeamCity version.

 

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: updated the link to the logger

...

The rest of settings will vary depending on the engine to run tests with:

VSTest Settings

 

Option

Description

Target platform

Select the platform bitness. Note that specifying x64 target platform will force the vstest.console process to be run in the isolated mode

Framework

If the default is specified, vstest.console will select the target framework automatically. You can also choose the .Net platform manually using the drop-down.

Test names

(optional) Of all tests discovered in the included assemblies, only the tests with the names matching the provided values will be run. For multiple values, use new line.

If the field is empty, all tests will be run. See details in the Microsoft documentation.  (warning) Cannot be used with the option below.

Test case filter

Run tests that match the given expression. See details in the Microsoft documentation. (warning) Cannot be used with the option above.

Run in isolation

Run the tests in an isolated process

Use real-time test reporting

  • If this checkbox is selected, a custom TeamCity test logger will be used for real-time reporting. See the next section for details.
  • If not selected, VSTest will report tests to TeamCity after the run (the discovery of custom logger will not be attempted).

    Note

    When using this option, it is recommended that you check the number of tests in the produced trx file against the build log. In case of incosistencies, switch to the custom logger.

     

...

To install the custom logger:

    1. Download the custom logger
    2. Extract the contents of the downloaded archive on the agent machine:
      • for VisualStudio 2017 update 5 onwards - to PROGRAM_FILES(x86)\Microsoft Visual Studio\2017\<Edition>\Common7\IDE\Extensions\TestPlatform\Extensions

      • for VisualStudio 2017 up to update 4 - to PROGRAM_FILES(x86)\Microsoft Visual Studio\2017\<Edition>\Common7\IDE\CommonExtensions\Microsoft\TestWindow\Extensions

      • for VisualStudio 2015 - to PROGRAM_FILES\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow\Extensions

      • for VisualStudio 2013 - to PROGRAM_FILES\Microsoft Visual Studio 12.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow\Extensions

      • for VisualStudio 2012 - to PROGRAM_FILES\Microsoft Visual Studio 11.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow\Extensions

...