-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
Mastering Application Development with Force.com
By :
Often, it seems that the answer to why do we write unit tests is because Salesforce makes us do it! This, however, is not the reason we should be writing unit tests. All classes in production orgs have to have 75% code coverage and all triggers must have some coverage. Salesforce enforces this for a number of reasons. As the platform evolves and new features are added, Salesforce needs to ensure that your applications will continue to run without an issue. To do this, they employ the hammer, a specialized test harness that allows them to run every unit test in every org twice. First, the hammer runs every test in every org on the current version of the platform. These same tests are then run on the pre-release version of the platform. This helps them ensure that your code not only runs on the new version of the platform, but that it also runs at least as efficiently as it did on the earlier platforms. Even if your unit tests have no assertions and utterly fail...
Change the font size
Change margin width
Change background colour