JetBrains / teamcity-dotnet-plugin

TeamCity plugin for .NET projects

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

dotnet test fails on test SLN

mbenua-mparticle opened this issue · comments

dotnet test allows you to run it on an SLN as of at least the 2.0 tooling (provided the SLN ONLY contains test projects). This is by several orders of magnitude the most efficient way to run tests, since it will run all test csproj in parallel, just like doing a build of an SLN will do.

However, the latest version of this plugin does not support this and throws a 'please specify a csproj' error when attempting to provide an SLN. Are there plans to more fully support the existing dotnet test behavior?

I can provide logs and repros as-needed.

@mbenua-mparticle, could you please specify your TeamCity and plugin versions?

Hi @dtretyakov - all the bundled plugins are version 50732, which appears to be the same version as our TC install.

Any other info you need? This is especially important to us, because running our unit tests via SLN takes about 2 minutes, and running them using the *.csproj method with the plugin takes about 15 minutes, so it's an enormous time savings.

@mbenua-mparticle, thanks for providing details. We'll support the case with sln file in the next plugin version.

Please note that there'is a performance problem with dotnet test which causes slow tests execution. Currently you could use the following workarounds:

  • Add explicit reference on teamcity test adapter in all test projects and add build configuration parameter: #111
  • Switch to dotnet vstest which could execute tests much faster: #101 (comment)

Thanks! Looking forward to it, so we no longer have to do our workarounds.

Any update? We've switched to using the new .net 2.1 preview, and now our tests via SLNcan takes as little as 2 minutes, while running using the dotnet plugin takes around 30 minutes.

Also, I'm now running this on my TC command (directly via Powershell) and it's working pretty well:
C:\BuildAgent\tools\JetBrains.dotCover.CommandLineTools.bundled\dotCover.exe analyse /TargetArguments="test tempbuild.sln --no-build --no-restore" /ReportType="DetailedXML" /TargetExecutable="C:\Program Files\dotnet\dotnet.exe" /Output="coverage.xml" /TargetWorkingDir="."

It finishes in a matter of a couple minutes as well (I run an SLN build beforehand, which also saves time comparing to running the build through the dotcover interface).

@mbenua-mparticle this plugin supports .sln files to run tests via test command
I've checked it just now. Is it possible to share a build log file?