Code Coverage - Worksheet
This guide will give you an insight into what Code Coverage is and how you can identify areas of
your code that need more testing, even if you haven't written any automated tests. It takes about
30 minutes to complete.
Tasks
1. What is Code Coverage (2 min)
2. Install the Code Coverage package (2 min)
3. Enable Code Coverage (1 min)
4. Understanding the game code: Shoot() function (4 min)
5. Generate a Coverage report from PlayMode tests (3 min)
6. Add Weapon tests to improve coverage (3 min)
7. Add a test for the LaserController (4 min)
8. Clear the coverage data (1 min)
9. Generate a Coverage report using Coverage Recording (4 min)
Note: Estimated times are shown for each task to give you a better understanding of the time
required. These times are rough guidelines - it is fine to take as much or as little time as needed.
You can find the latest Code Coverage package documentation
here.
For questions and feedback please visit the Testing & Automation forum section to browse current
conversations or start a new thread. Please use the code coverage tag.
1