MSTest Support

Search
Searching TeamCity 4.x Documentation
Table of Contents

For .NET runners TeamCity provides support for MSTest 2008 testing framework via parsing of the MSTest 2008 results file (.trx file).

Due to specifics of MSTest 2008 test runner, TeamCity does not support on-the-fly test reporting for MSTest. All test results are imported after tests run has finished.

The most handy way to report tests results for MSTest 2008 is using TeamCity Service Messages. This method is applicable for any build runner.
In addition, for Solution 2008 build runner TeamCity provides possibility to enable and customize MSTest 2008 parameters via web UI, without using service messages.

Supporting MSTest 2008 with Service Messages

TeamCity reports test results from MSTest 2008 parsing results .trx-file.
To provide .trx-file, send the following service message:

##teamcity[importData type='mstest' path='<path to .trx file>']
Make sure that created .trx-file is not deleted after sending mentioned TeamCity service message.

MSTest for Solution2008 Build Runner

Solution 2008 build runner provides UI to fill MSTest arguments for the process to run.
Refer to the sln2008 settings description for details.

Autodetection of MSTest

Build agent will add %system.MSTest.9.0% system property (see Build Agent Configuration for detail) in cases MSTest.exe from Microsoft Visual Studio 2008 is found on the build agent running system.



See Also:

Labels