How do I setup TeamCity to run MSTest(s) 2010?

Hey all,

Apologies if I say anything stupid in advance

I've created a project in VS2010, created a SVN repository for it, and created a build configuration for it (which was pretty easy - thankfully)

Here are my build runner settings :

Build Runner  : Visual Studio (sln)
Solution file path : MySolution.sln
Working Directory : --
Visual Studio : MS VS 2010
Targets : Clean Build
Configuration : Debug
Platform : any cpu

Run MSTests : CHECKED
Path to MSTest.exe %system.MSTest.10.0% (64-bit AMD cpu)
List assembly files : %system.agent.work.dir%\MySolution.Debug\MSTests.MyTests\bin\Debug\MSTests.MyTests.dll
MSTest run configuration file : Local.testsettings (I've edited the file with VS2010 and set the output trx file to a constant value without a timestamp - TestResults.trx)
Results file : TestResults\TestResults.trx

I'm getting the following response in the build log :

[MSTest] File C:\BuildAgent\work\MySolution.Debug\TestResults\TestResults.trx does not exist. Please check if MSTest process failed
[MSTest] Build finished

What did  I mess up?

4 comments

Hello Maciej,

Could you please clear "Result Path", run build again and attach full build log.

I have also additional question. Does test assembly has target platform set to x64?
Could you please also try to run MSTest from command line using the same MSTest.exe and test assembly under the same user account?

Thanks,
Marina

0

Seems that clearing the results field did the trick, cheers!

0

Hi!

I have the exact same problem with my setup.
The solution has just been created, build is successful, but the MStest fails with:

[11:08:44]: MSTest (running for 7m:13s)
[11:08:44]: [MSTest] File C:\TeamCity\buildAgent\temp\buildTmp\tmp230C.tmp.teamcity.trx does not exist. Please check if MSTest.exe process failed.
[11:08:44]: [MSTest] Build finished

0

To others with the same problem: Check the full path (+ mstest.exe) in the config. This was my mistake

:)
0

Please sign in to leave a comment.