chocolatey / Chocolatey.Cake.Recipe

A set of convention based Cake scripts for building Chocolatey projects
Apache License 2.0
5 stars 9 forks source link

Exception in unit test task aborts build before uploading results #91

Closed AdmiringWorm closed 1 year ago

AdmiringWorm commented 1 year ago

What You Are Seeing?

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:

  1. In Test-Nunit, Test-Xunit or DotnetCore-Test, add an explicit throw new Exception statement after running the unit tests
  2. Notice the build is aborted immediately and no coverage report is generated (or unit test statistics)

System Details

Output Log

Full Log Output

~~~sh https://gist.github.com/AdmiringWorm/c91b000c5d6064b79d2da4aeca870c75 ~~~

choco-bot commented 1 year ago

:tada: This issue has been resolved in version 0.20.0 :tada:

The release is available on:

Your GitReleaseManager bot :package::rocket: