To add Code Coverage reporting to a project with unit tests, follow these steps:
- Open the Package Manager window (menu: Window | Package Manager), select the Unity Registry list of packages, and type Code Coverage into the search bar. When you see the Code Coverage package listed, click the Install button:

Figure 13.32 – Using Package Manager to install Code Coverage
- Open the Code Coverage window by going to Window | Analysis | Code Coverage.
- In the Code Coverage window, check the Enable Code Coverage option. Then, ensure the Generate HTML Report and Auto Generate Report options are checked:

Figure 13.33 – Code Coverage window options
- In Test Runner, choose PlayMode and click the Run All Tests button.
- Once the testing is finished, an HTML code coverage report should automatically be created and opened in your computer's default web browser application. The report will be created in a new folder named Report...