To calculate test coverage, you can divide the number of lines covered by a test by the total number of lines in your application’s test code.