When an exception occurs in Test-NUnit, Test-Xunit or DotnetCore-Test (like some failing tests) the build is aborted immediately before the build reaches the target responsible for uploading tests to the build server (or generating local test coverage).
What is Expected?
Would expect both the local coverage report to be built, or the test coverage report be uploaded to the build server before aborting the build itself.
How Did You Get This To Happen? (Steps to Reproduce)
Easiest without having failing builds:
In Test-Nunit, Test-Xunit or DotnetCore-Test, add an explicit throw new Exception statement after running the unit tests
Notice the build is aborted immediately and no coverage report is generated (or unit test statistics)
System Details
OS Build (In PowerShell run [System.Environment]::OSVersion.version.tostring()): 10.0.22000.0
Windows PowerShell version (Run: $PSVersionTable): 5.1.22000.832
What You Are Seeing?
When an exception occurs in
Test-NUnit
,Test-Xunit
orDotnetCore-Test
(like some failing tests) the build is aborted immediately before the build reaches the target responsible for uploading tests to the build server (or generating local test coverage).What is Expected?
Would expect both the local coverage report to be built, or the test coverage report be uploaded to the build server before aborting the build itself.
How Did You Get This To Happen? (Steps to Reproduce)
Easiest without having failing builds:
Test-Nunit
,Test-Xunit
orDotnetCore-Test
, add an explicitthrow new Exception
statement after running the unit testsSystem Details
[System.Environment]::OSVersion.version.tostring()
): 10.0.22000.0$PSVersionTable
): 5.1.22000.832choco --version
): 1.2.0Output Log
Full Log Output
~~~sh https://gist.github.com/AdmiringWorm/c91b000c5d6064b79d2da4aeca870c75 ~~~