JetBrains / teamcity-dotnet-plugin

TeamCity plugin for .NET projects

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Duplicated number of tests

dtretyakov opened this issue · comments

While executing dotnet test for project WindowsAzure in the build log logged correct number of executed tests, but on the Tests tab displayed duplicated entries:

[15:26:17][Step 2/2] Total tests: 413. Passed: 341. Failed: 0. Skipped: 72.
[15:26:17][Step 2/2] Test Run Successful.
[15:26:17][Step 2/2] Test execution time: 2.7989 Seconds

image

The same happens with dotnet vstest command.

It seems that it was caused by data races while writing output:
image

Can be reproduced in TeamCity 2017.1 and 2017.2 EAP.

@dtretyakov I am seeing a similar duplication of test results from dotnet test

You've marked this (and the referenced issue) as closed. Can you tell me if there has been a fix? And if so, which version would it be in?

Please let me know if you need me to share more about the details of my issue (repo, logs, versions, etc)

@dtretyakov Worked perfectly. Problem solved. Much thanks

was the fix for this issue released?

@cod7alex, yes for TeamCity 2017.1.x you could download the latest plugin version from https://plugins.jetbrains.com/plugin/9190--net-cli-support

TeamCity 2017.2 has bundled .NET CLI plugin with a fix.

@dtretyakov thank you very much

I had the exact same problem but with the Visual Studio Tests runner (VSTest 2017) on TeamCity 2019.1 (build 65998) where it would report duplicate tests under the Tests tab but the correct number in the logs.

I switched to use the .NET CLI (dotnet) runner with the vstest command and now the reported number of tests by TeamCity is correct.

exactly the same as @0xced