I'm having an issue with running xUnit with JustMock and dotCover on TeamCity.
I've setup my environment parameter JUSTMOCK_INSTANCE=1 on the build configuration and linked the dotCover profiler on the "Telerik JustMock Configuration" interface.
I'm using the "xUnit.net + dotCover 💕" metarunner and it is executing the tests. But after it has executed the tests (no errors), dotCover does not finish generating the coverage data file. The process just "hangs", so to speak, after the last test.
When I unlink the dotCover profiler on the "Telerik JustMock Configuration" interface, and use JustMockRunner.exe, the process does finish, but no coverage data is generated.
TeamCity Command Line script (in stead of meta runner):
When running xUnit directly is does not execute most of the unit tests, because JustMock is not in elevated mode of course, but it does finish the process generate the coverage data. Indicating for me, that dotCover is working fine.
TeamCity command line script (in stead of meta runner):
%teamcity.tool.dotCover%\dotcover cover /TargetExecutable="%system.teamcity.build.workingDir%\packages\xunit.runner.console.2.2.0\tools\xunit.console.exe" /TargetArguments="mytestassembly.dll" /ReturnTargetExitCode
It makes sense that the dotCover profiler should run together with JustMock so the data can be generated, but every time I link the profiler, the process hangs after all tests have been executed.
Different test assemblies show the same result.
Versions:
JustMock: 2016.3.914.2
Team City 10.0.2 (build 42234)
xUnit: 2.2.0
dotCover: 2016.2.2
Is this a known issue? Please let me know if you need more information.
Thanks.