Moles causing "exited with code 1" error in mstest.exe RRS feed

  • Question

  • I have a solution that has hundreds of unit tests in it. About 40 of them are using Moles. As part of our build process, any test labeled "Deployment" is run. I had 8 tests that were labeled that way. When I commited this code, the build was broken. The error line looks like this:


    Z:\Builds\WorkingDirectory\8.0_C\default.proj(84,5): error MSB3073: The command ""c:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\mstest.exe" /testmetadata:AllTests.vsmdi /testlist:IncludeInBuild /resultsfile:"Z:\Builds\Artifacts\Cont\Artifacts\UnitTestLog.xml"" exited with code 1.


    There are many lines in the log that look like this:

      <message>  [host] running ProcessFiles_...</message>
      <message>  [host] running ProcessFiles_...</message>
      <message>  [host] pre test run finished</message>
      <message>  [host] stopping worker thread</message>
      <message>  [host] worker thread finishing</message>
      <message>  [host] cleanup</message>


    When I removed the "Deployment" description from the moles tests they stopped running in the deployment build. That fixed the build. Also the lines that said "[host]" went away. The only conclusion that I can make from this is that Moles has a bug related to mstest.exe. The tests run successfully from within VS2008.

    Tuesday, December 28, 2010 12:28 AM

All replies

  • Why did the run fail? Was it some unit tests failing unexpectidely or was it an error in the Moles host itself?
    Jonathan "Peli" de Halleux - Try Pex online at www.pexforfun.com!
    Wednesday, January 5, 2011 4:37 AM
  • Well, there's no way to determine that from the logs. There's the "<message>  [host] running ProcessFiles_...</message>" that looks like it's running a test. I don't see any way to tell if the test failed. I do know that the test passed when running locally. 
    Monday, January 10, 2011 10:48 PM