TeamCity Test Execution

TeamCity installation

There are no specifics in installation of the TeamCity server. To be able to execute automated tests that include Windows desktop interactions it is necessary to install the build agent not as a service. During the agent installation uncheck the service installation checkbox as shown here:

Build agent installation

Run the build agent

The build agent have to be started in a console mode. To complete that 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'.

Configure the build agent

Important: 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.

Execute test using MSTest

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

Execute tests using ArtOfTest.Runner.exe

To run on the build agent using a command line runner - the build step have to include the following settings:

ArtOfTest.Runner build step configuration