TeamCity doesn't use MsTest for running unit tests.

Hi,

Ours is a SL application. Therefore, the tests are contained in a SL class library. I notice a few problems in the build log -

1) TC doesn't use MsTest.exe even though I've given it the full path (as VS is not installed on the default location on the server). It uses NUnitLauncher.exe.
2) It is able to locate the correct test assembly, but gives me this error -

[16:31:01][Step 2/2]  Unable to load the test container  'E:\TeamCity\buildAgent\work\7538393f095686f7\eBenefitSync\test\Tmg.EBenefitSync.Presentation.UI.Lookups.Tests\Bin\Debug\Tmg.EBenefitSync.Presentation.UI.Lookups.Tests.dll'  or one of its dependencies. Error details:  System.IO.FileNotFoundException: Could not load file or assembly  'System.Windows, Version=2.0.5.0, Culture=neutral,  PublicKeyToken=7cec85d7bea7798e' or one of its dependencies. The system  cannot find the file specified.

This test project has a reference to System.Windows (version 5.0.5.0), so why is TC complaining about version 2.0.5.0?

Also I can't give any MsTest metadata file to build configuration step, because it is not a normal MsTest unit test project (and so doesn't have a .vsmdi file).

Please let me know how to configure this so that it runs the unit tests properly.

Note: SL version 5 is installed on the server.

Thanks,
Manoj.



Attachment(s):
eBenefitSync_Integration_Build_572.log.zip
2 comments
Comment actions Permalink

Hi Manoj,

> 1) TC doesn't use MsTest.exe even though I've given it the full path (as VS is not installed on the default location on the server). It uses NUnitLauncher.exe.

NUnitLauncher is used when you configure NUnit runner in TeamCity. To use MSBuild, please use MSBuild runner.

> 2) It is able to locate the correct test assembly, but gives me this error -

Please review our general guidelines for the different behavior under TeamCity.

I am not Silverlight or .Net expert, so I am affraid I do not have any specific advices on the issue.

0
Comment actions Permalink

Thanks for the reply Yegor.

My problem is solved. Here's the explanation -

1) MsTest.exe was not installed in the default location. When I gave it the exact location, TC was able to launch MsTest. The other solution is to paste the folder(s) containing MsTest.exe in the default path.

2) One cannot use MsTest to run SL Unit Test Applications. As mentioned in other threads, one has to use StatLight.exe (available on CodePlex) in TC.

Regards,
Manoj.

0

Please sign in to leave a comment.