Do you use Live Unit Testing to see code coverage?

Last updated by Lee Hawkins [SSW] over 1 year ago.See history

By enabling Live Unit Testing in a Visual Studio solution, you gain insight into the test coverage and the status of your tests.

Whenever you modify your code, Live Unit Testing dynamically executes your tests and immediately notifies you when your changes cause tests to fail, providing a fast feedback loop as you code.

Note: The Live Unit Testing feature requires Visual Studio Enterprise edition

To enable Live Unit Testing in Visual Studio, select Test | Live Unit Testing | Start

You can get more detailed information about test coverage and test results by selecting a particular code coverage icon in the code editor window:

live unit testing good
Figure: This code is covered by 3 unit tests, all of which passed

Tip: If you find a method that isn't covered by any unit tests, consider writing a unit test for it. You can simply right-click on the method and choose Create Unit Tests to add a unit test in context.

For more details see Joe Morris’s video on .NET Tooling Improvements Overview – Live Unit Testing.

We open source. Powered by GitHub