Have you ever wondered how Salesforce rolls out a new release to an estimated 10.8 million users without managing to break existing logic or custom applications built on their Force.com framework?Well Josh Kaplan, Salesforce’s Senior Product Manager wrote a great article called “Here Comes The Hammer”. This article explains how Salesforce runs a process called “The Hammer”, which will take every single Apex test that you or anyone else has created, and run those tests twice. There are over 60 million Apex tests to run so they really are hammering on their framework. All tests will be run against the current version of Salesforce (the one you’re using today in production), and then run again against the candidate version. The results are then compared to look for any unexpected functionality changes between the releases.
The Hammer process is the reason Salesforce enforces a 75% minimum code coverage limit, meaning that any code that is in production must have Apex tests that touch at least 75% of each class. If there is less than 75% code coverage, Salesforce will block you from pushing that code into a Production environment. This allows Salesforce to run all tests with high confidence that they are testing the majority of their logic, the Force.com framework and any logic in custom applications.