Installing Code Coverage
Before you begin the following procedure, make sure you have no errors in the Console window (in red text).
Unity 2020.1 and later versions
Go to Edit > Project Settings > Package Manager, check Enable Preview Packages and confirm.
Open the Package Manager (go to Window > Package Manager).
Make sure Packages: All is selected.
Find the Code Coverage package in the package list (left hand side) or enter Code Coverage in the search box.
Select the Code Coverage package in the package list (left hand side), then select the Install button in the package details (right hand side).
To verify that Code Coverage has been installed correctly, open the Code Coverage window (go to Window > General > Code Coverage).
If you don't see the Code Coverage menu item, then Code Coverage did not install correctly.
Unity versions prior to 2020.1
Open the Package Manager (go to Window > Package Manager).
Enable the Show preview packages option to see the Code Coverage package in the package list.
Make sure All packages is selected.
Find the Code Coverage package in the package list (left hand side) or enter Code Coverage in the search box.
Select the Code Coverage package in the package list (left hand side), then select the Install button in the package details (right hand side).
To verify that Code Coverage has been installed correctly, open the Code Coverage window (go to Window > General > Code Coverage).
If you don't see the Code Coverage menu item, then Code Coverage did not install correctly.