CRT-450 practice question 16 of 30
Which two events need to happen when deploying to a production org? Choose 2 answers
Full set: 201 questionsSalesforce enforces strict testing prerequisites for deploying code to a production environment to maintain system stability and quality. A deployment to a production org will fail if the following conditions are not met:
1. The cumulative Apex code in the org, including the code in the deployment package, must have a minimum of 75% test coverage.
2. Every individual Apex trigger included in the deployment must have some test coverage (i.e., greater than 0%). These are non-negotiable, platform-enforced quality gates for production deployments.
1. Salesforce Apex Developer Guide, "Testing and Code Coverage": "To deploy Apex to a production organization... at least 75% of your Apex code must be covered by tests, and all of those tests must pass. In addition, each trigger must have some test coverage." This source directly validates options B and C.
2. Salesforce Help, Article 000384838, "Deploying Apex": This article reiterates the core requirement: "Before you can deploy your code, at least 75% of Apex code must be covered by unit tests, and all of those tests must pass. Also, each trigger must have some test coverage." This confirms B and C as mandatory events.
3. Salesforce Help, Article 000386415, "Test Coverage for Record-Triggered Flows": "To deploy a record-triggered flow that contains a Pause element, the flow must have test coverage." This demonstrates that the test coverage requirement for flows is conditional and not applicable to all flows, thus invalidating option D.
4. Salesforce Metadata API Developer Guide, "deploy() Call", testLevel Enumeration: The documentation for the RunLocalTests value states, "All tests in your org are run, except the ones that originate from installed managed packages... This test level is the default for production deployments that include Apex classes or triggers." This confirms the execution of tests to enforce coverage rules (B and C) during production deployments.
Keep practicing
Take the free CRT-450 practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other CRT-450 practice questions
- Question 2A developer created a child Lightning web component nested inside a parent Lightning web …
- Question 4A developer needs to make a custom Lightning Web Component available in the Salesforce Cl…
- Question 6Given the following Apex statement: Account myAccount = [SELECT Id, Name FROM Account); W…
- Question 8Which action causes a before trigger to fire by default for Accounts?
- Question 9Universal Containers (UC) wants to lower its shipping cost while making the shipping proc…
- Question 10A custom picklist field, Pool Preference ¢, exists on a custom object. The picklist conta…
