Welcome to Typemock Answers. Here you can ask and receive answers from other community members. And if you liked or disliked an answer or thread: react with an up- or downvote Enjoy!

TypeMock was working on 32-bit build server with MSBuild now failing on all 64-bit build servers

0 votes
I had been corresponding directly with TypeMock, but they have gone silent, so I was hoping maybe to get some support by posting on their Q/A page

We were running our TypeMock test on our TFS build servers with msbuild without any issue. They were 32-bit servers. We started adding 64-bit servers. I noticed the same build would fail on these servers and pass on the 64-bit servers.

We are using TypeMock 6.0.2.

We have now obsoleted all of our 32-bit build servers and the type-mock failure we are having is a show-stopper.

Again the issue is that running TypeMock start prior to tests being executed worked perfectly on the 32-bit systems. We did nothing different on the 64-bit system, so it is strange that the error seems to indicate that typemock is not running. Again the scripts that we run are “EXACTLY” them same as those passing on the 32-bit system.

 

Once again we run TypeMockStart just before executing the tests (see snippet from buildlog.txt results), but for some reason TypeMock doesn’t think it is running.

Buildlog.txt snippets;

BeforeTest:

  Starting Type Mock

Project "c:\TF1\CALSW_Exec_TME\CALSW_Exec_TME_Validate\BuildType\TFSBuild.proj" (1) is building "c:\TF1\CALSW_Exec_TME\CALSW_Exec_TME_Validate\BuildType\TFSBuild.proj" (1:5) on node 1 (RunTest target(s)).

RunTest:

  Creating directory "c:\TF1\CALSW_Exec_TME\CALSW_Exec_TME_Validate\TestResults".

  md "c:\TF1\CALSW_Exec_TME\CALSW_Exec_TME_Validate\TestResults"



  Starting execution...

 

  Results               Top Level Tests

  -------               ---------------

  Failed                (ValidateBuild/)DomainModelUnitTest.AsyncActivityTest.TestSimpleActivityPassingNullAction

  Failed                (ValidateBuild/)DomainModelUnitTest.EntityTest.PropertyOnChangeCalledTest2



 

In the TFSBuild.proj file the following was defined;

 

  <!-- Use TypeMock.NET MsBuild Extensions -->

  <Import Project="$(MSBuildProgramFiles32)\TypeMock\Isolator\6.0\TypeMock.MSBuild.tasks" />

  <!-- Override this target to plugin custom tasks before running tests -->

  <Target Name="BeforeTest">

    <!-- Start TypeMock -->

    <Message Text="Starting Type Mock"/>

    <TypeMockStart/>

  </Target>

  <!-- Override this target to plugin custom tasks after running tests -->

  <Target Name="AfterTest">

    <!-- Quit TypeMock -->

    <Message Text="Stopping Type Mock"/>

    <TypeMockStop/>

  </Target>
asked Oct 26, 2016 by JonMoens (160 points)

1 Answer

0 votes

Turns out it wasn't actually a server configuration problem but an msbuild issue with the new versions.

Found this post that had indicated the scope now for the mstests execution wasn't using the typemock start properly, there were suggestions on changes that could be made to the TfsBuild.proj file for my msbuild. Made the changes and that worked, I am now able to run my typemock tests successful on my integration builds.

 

answered Oct 26, 2016 by JonMoens (160 points)
...