Study for the Salesforce Platform Developer Exam. Study with flashcards and multiple choice questions, each question has hints and explanations. Get ready for your exam!

Practice this question and more.


Before deploying code to production, what is the minimum percentage of test coverage required?

  1. 25%

  2. 50%

  3. 75%

  4. 100%

The correct answer is: 75%

To successfully deploy code to production in Salesforce, it is mandated that a minimum of 75% code coverage is achieved through automated tests. This requirement ensures that a significant portion of the code has been tested, which contributes to the overall stability and reliability of the application before it goes live. The 75% threshold is specifically important as it reflects a standard practice to encourage developers to write unit tests for their code, helping to identify potential bugs and ensuring that the logic works as intended. This percentage does not imply that the remaining 25% of code can be ignored; rather, it signifies that the majority of the code base should be validated through test cases, fostering a culture of quality and accountability within the development process. Ideally, aiming for even higher coverage would be beneficial, as greater coverage can lead to more robust and maintainable code. Furthermore, Salesforce enforces this 75% code coverage requirement as part of its deployment process to promote best practices in writing code and to mitigate risks associated with deploying untested features.