Chapter 9. Test Coverage

Ah yes, the Achilles heel of developers as a whole. No one enjoys writing test coverage, or extensively testing their functionality against potential end user pitfalls, but it is nevertheless a real requirement. For the Salesforce1 Platform, it is recommended that the developer strive for 100 percent coverage across every class, but only 75 percent average across all classes is required to actually deploy one's code to Production.

There are two schools of writing test coverage, one that is the half-assed approach of just getting lines covered to get the percentage required, and the other, which is the correct approach, of writing test coverage that mimics the business process, which should by its very progression cause ...

Get Learning Apex Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.