For most stuff I end up needing a MsBuild Script to get all the Tasks done required for our Builds. If you choose MsBuild as a buildrunner in Teamcity you lose the nice GUI for configurating MsTest . So you need to run the tests by yourself with a simple target in an MsBuild script:
<Exec IgnoreExitCode=”true” Command=”"$(VS2008_Path)\mstest.exe" /testcontainer:BridgeTest.dll /resultsfile:BridgeTest.trx” />
<Message Text=”##teamcity[importData type='mstest' path='BridgeTest.trx']“/>
The Trick is the Second Task which serves as a Service Message and tells Teamcity to Import the results from MsTest.
Mostly the same applies for Nunit Tests – yet you don’t need the Service Message because Teamcity can import Nunit reports from the gui.