Reporting

Of course, we will need some test reports that we can publish to Jenkins later on. Unfortunately, and it pains me to say this, Microsoft is doing a really bad job at this. You can forget about an out-of-the-box code coverage option unless you are running Visual Studio Enterprise Edition (which costs you an arm and a leg and only runs on Windows). Even a simple JUnit style report is too much to ask for at this point; Microsoft only outputs TRX files (Test Result X...?), which is just another XML file.

First, let's just output the TRX file. It is quite easy actually--just append --logger trx, or -l trx for short, to your dotnet test command:

dotnet test -l trx

The file will be generated in a TestResults folder. We can also specify ...

Get Continuous Integration, Delivery, and Deployment now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.