The Apex testing framework generates code coverage numbers for your Apex classes and triggers every time you run one or more tests. Code coverage indicates how many executable lines of code in your classes and triggers have been exercised by test methods.
Apex provides a testing framework that allows you to write unit tests, run your tests, check test results, and have code coverage results. Let’s talk about unit tests, data visibility for tests, and the tools that are available on the Lightning platform for testing Apex.