TeamCity provides support for MSTest 2005/2008/2010 testing framework via parsing of the MSTest results file (.trx file). Due to specifics of MSTest test runner, TeamCity does not support on-the-fly test reporting for MSTest. All test results are imported after tests run has finished. There are two ways to report test results to TeamCity:
TeamCity reports test results from MSTest 2005/2008/2010 parsing results .trx-file. To provide .trx-file, send the following service message:
##teamcity[importData type='mstest' path='<path to .trx file>']
note
Make sure that created .trx-file is not deleted after sending mentioned TeamCity service message.
Autodetection of MSTest
Build agent will add %\system.MSTest.8.0%, %\system.MSTest.9.0% or %\system.MSTest.10.0% system property (see Build Agent Configuration for detail) in cases MSTest.exe from Microsoft Visual Studio 2005/2008/2010 is found on the build agent running system.