|Important||This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer|
Configuring Code Coverage
Team Edition for Testers can gather code coverage data when it runs tests, and it presents this data to you in different ways, statistically and graphically. You can change certain aspects of the way code coverage data is gathered and displayed.
Gathering Code Coverage Data
To obtain code coverage data, the assembly being tested must first be instrumented. You can choose whether to have assemblies instrumented in their original folder, or in the folder to which they are deployed for testing. If you are working with signed assemblies, you can make decisions about the re-signing that occurs after they are instrumented on the Code Coverage page of the test run configuration editor, as described in. For more information about the sequence of deployment steps, see .
Display of Code Coverage Data
Data that is presented statistically is displayed in the Code Coverage Results window. For more information, see "Viewing Code Coverage Data" in.
Graphical presentation displays lines of code that have been exercised in a different color than lines of code that have not been exercised. You can choose to enable source-code coloring by default in the Options dialog box opened on the Tools menu of Visual Studio. To find this setting, look on the Test Execution page under the Test Tools node. You can also change the colors used to show code coverage. For more information, see the section "Changing the Display of Code Coverage Data" in.