In this chapter, you've learned every basic step of unit testing in Salesforce. These basics are necessary for any deployment process.
Salesforce recommends 75% overall coverage, but I recommend covering as much as possible. You can't test everything, such as throwing an exception during a network interruption, but most of the time, you are able to have test coverage for at least 85% for classes with more than 50 lines.
Remember, there are three important steps that you must take into account while you are creating your tests: create your own test data, perform your test scenario and execute it between the Test.startTest() and Test.stopTest() functions, and verify your retrieved result with assertions.
Happy testing!
It's time to check whether you remembered what we went through in this chapter by completing a quiz. As always, the solutions are at the end...