A useful tool in projects with code testing is to be able to analyze how much of a C# script class is being tested. For example, is every method being tested with at least 1 set of test data? Unity now offers a Code Coverage feature, which we'll explore in this final code testing recipe. As shown in the following screenshot, Unity allows us to create a set of HTML pages for documenting the Code Coverage of tests against C# code. With this, we can see what percentage of our code is covered by tests, and even which lines of code are, and are not, covered by our tests:
![](https://static.packt-cdn.com/products/9781839217616/graphics/assets/5d817b1e-e3a8-4bbb-95a7-c2b772b7927f.png)
Figure 13.31 – Code Coverage HTML report for the Player script class