Performing code coverage testing
To perform code coverage testing, we need to open the build pipeline that we created in the previous demo. Let's get started:
- With the build pipeline open, select the Edit button in the right-hand corner:
- Navigate to the Test Assemblies task to open the settings.
Under Execution settings, check the Code coverage enabled box:
- Now, Save and queue the build, specify a save comment, and wait until the pipeline is fully executed. The Visual Studio Test task creates an artifact that contains
.coverage
files that can be downloaded and used for further analysis in Visual Studio. - After executing the pipeline, on the overview page of the build, select Code Coverage from the top menu and click on Download code coverage results. A file with the
.coverage
extension will be downloaded to your local filesystem. - Double-click...