How to add trace output to unit tests?

In the other thread where I noted the GUI test runners, they show each test run and typically change color of the test to green if the test succeeds and color the test red if the test fails.

image

(Image from Wikipedia CsUnit).

Most GUI test runners include the console output of the test run as some test cases will create a stack trace that is sent to the console instead of being captured for the test.

Another nice feature that many of the GUI test runners have is the ability to run subsets of the test, e.g. only failed test. The really nice ones will not only show failed test but by clicking on the failed test will start the build environment and then take you to the line of code in the editor.

As I noted I only used one of these GUI test runners extensively with F# so don’t know how many of these features were hard coded to work with F# and Visual Studio, not to be confused with Visual Studio Code.