chevron-thin-right chevron-thin-left brand cancel-circle search youtube-icon google-plus-icon linkedin-icon facebook-icon twitter-icon toolbox download check linkedin phone twitter-old google-plus facebook profile-male chat calendar profile-male
0 votes
Hi,

we are running our unit tests in teamcity and use typemock as our mocking framework. For some reasons one test fail when running on teamcity.
If we ignore this test another will fail
If we run this test in visual stuidio everything its ok
If we run this on server with TMock runner its ok
but not when we running this test with <Nunit or Exec Command="$(teamcity_dotnet_nunitlauncher)

If we will use the TMock runner we do not have any possibility to use the integration in teamcity.

Typemock version: 7.4.1
TeamCity 8.0 (build 27402)

thanks for help,

Moritz

MSBuild-Script:
<Project DefaultTargets="Typemock" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project ="$(TypemockLocation)TypeMock.MSBuild.Tasks"/>
<ItemGroup>
<TestAssembly Include="$(Testpath)" />
</ItemGroup>
<Target Name="Typemock">
<TypemockStart />
<Exec Command="$(teamcity_dotnet_nunitlauncher) $(TargetFramework) $(NUnitPlatform) $(NUnitVersion) %(TestAssembly.Identity)" />
<TypemockStop />
</Target>
</Project>

Error-Message:
[Step 2/2] GDVDL.Adapter.eCall.Tests.dll (40s)
[16:02:54][GDVDL.Adapter.eCall.Tests.dll] GDVDL.Adapter.eCall.Tests.ECallProtokollTests.Given_Successful_Registration_For_ECallStatus_Polling_When_Deregistration_Is_Send_Then_Stop_Polling (1s)
[16:02:55][GDVDL.Adapter.eCall.Tests.ECallProtokollTests.Given_Successful_Registration_For_ECallStatus_Polling_When_Deregistration_Is_Send_Then_Stop_Polling] Test(s) failed. System.Reflection.TargetInvocationException : Ein Aufrufziel hat einen Ausnahmefehler verursacht. ----> TypeMock.TypeMockException : *** No method with name Given_Successful_Registration_For_ECallStatus_Polling_When_Deregistration_Is_Send_Then_Stop_Polling>b__4e in type GDVDL.Adapter.eCall.Tests.ECallProtokollTests exists.
/// This not existing method is the method with the Test-attribute
asked by Moritz (3.3k points)

2 Answers

0 votes
Hi Moritz,

In the failing test there is a when called statement with a lambda that receives a lambda as a parameter.
Please pass null instead of the inner lambda and let me know if it helps.

If it doesn't, run it with Typemock logs and send them to us.
In order to enable the logs open VS -> Typemock menu -> options ...


Looking forward to your reply.
answered by alex (17k points)
0 votes
Hi Alex,

I did not see that you reply in the forum. But I still get the same error.
I activate the logging by adding a log path to typemockstart. Hope thats correct and send this logs to you via email.

Regards and thanks for investigation,
Moritz
answered by Moritz (3.3k points)
...