TeamCity Test Execution

TeamCity 7.x agents can build and execute Test Studio tests by following the following steps:

When configuring build agents, select the Windows User agent mode:

  • For build steps that build test projects, select the Visual Studio (sln) build runner.

Agent mode

  • For test execution steps, Select the MSTest runner.

Agent mode for execution steps

Select the location of the target .tstest file for the assembly files and tests. Each field in the MSTest build step corresponds to an argument in the MSTest command line tool.

MSTest runner

Before running the build agent, be sure that Test Studio Runtime Edition is installed on your build agent machine. In order for some test steps to execute properly, it is necessary for the build agent to be running in console mode.

To run the build agent in console mode follow these steps:

  1. Locate the build agent's bin folder. The default is C:\TeamCity\buildAgent\bin.

  2. Open a command prompt window.

  3. Change to the bin folder you just located.

  4. Enter 'agent start'.