Open noujaimc opened 6 years ago
This might help, so as to make it work against XUnit 2.3.0: https://github.com/JetBrains/meta-runner-power-pack/issues/96 (Comments section)
Do you have a work around for this ? Both xUnit.net meta-runner for TeamCity and this plugin stopped working 🛩
@valeriob I also had this issue and found that the problem exists because of this code: https://github.com/JetBrains/meta-runner-power-pack/blob/447d45491fa2a2617b12862ce3846f6141ce31c6/xUnit.net-dotCover/MRPP_xunit_dotcover.xml#L107
Remove the .Trim() call from $excludedAssemblies, it's an array not a string.
E.g.
$assembliesFromPath = (Get-ChildItem $filterPath.Trim() -Recurse -Exclude $excludedAssemblies | select -ExpandProperty FullName)
I also had an issue with the dotCover tool variable changing in 2017.2, so updating the $dotCoverExecutable to %teamcity.tool.JetBrains.dotCover.CommandLineTools.bundled%
made everything work fine.
edit: Also have an issue with the installed xunit version changing the binary path. Adding net452 to the tools path fixes that. $xunit = Join-Path $workingDir "xunit.runner.console.*\tools\net452\$xUnitExe" | Resolve-Path
Thanks @theit8514 i'll try that ! Yep dot cover is broken in 2017.1 for netstandard libraries, i tried to update the tool in the admin console and make it default, but the build process kept using the old one. I ended up upgrading teamcity to 2017.2 with the new dotcover (109 i think ) inside. It sucked, it took so much to understand what was wrong, i really thought it was my code...
Well i found out that the plugin uses this teamcity variable %teamcity.tool.dotCover% but i do not have it defined in 2017.2 -.- is it just me or it's a breaking change ?
[12:06:50][Step 1/1] Pacchetto "xunit.runner.console.2.3.1" Š gi… installato [12:06:50][Step 1/1] Found test assemblies: C:\TeamCity\buildAgent\work\3915e306ed37130f\src\OnTms\OnTms.Test\bin\Release\OnTms.Test.dll C:\TeamCity\buildAgent\work\3915e306ed37130f\src\OnTms\OnTms.Tenants.Test\bin\Release\OnTms.Tenants.Test.dll C:\TeamCity\buildAgent\work\3915e306ed37130f\src\OnTmsCarichi\OnTms.Carichi.Test\bin\Release\OnTms.Carichi.Test.dll [12:06:50][Step 1/1] Run test coverage: True [12:06:50][Step 1/1] dotCoverExecutable: %teamcity.tool.dotCover% [12:06:50][Step 1/1] dotCoverArgs: cover coverage_settings.xml /LogFile=dotCoverXunitLog.txt /ReturnTargetExitCode [12:06:50][Step 1/1] ##teamcity[buildStatus text='Impossibile caricare il modulo '%teamcity.tool.dotCover%'. Per ulteriori informazioni, eseguire 'Import-Module %teamcity.tool.dotCover%'.' status='FAILURE']
@theit8514 I understand that .Trim()
should be removed. Curious to know why it worked in my case. Could it be due to a more recent version of Powershell ?
Hello, since the release of 2.3 of XUnit, the meta-runner does not work anymore. The XUnit team changed the location of the xunit.runner.console.
You guys will have to check the version of XUnit downloaded from the feed to determine if the console application is in tools or tools\net452.
Also, I noticed that after the changes that @Asif Ahmed on supporting multiple paths, the script gives me the the following errors:
I do not have any problems using commit d31019448db4dc03f9b047791c6b4e7cbc361413.
Thank you.