Salesforce Certified Development Lifecycle and Deployment Designer — Question 9
Universal Containers (UC) wants to shorten their deployment time to production by controlling which tests to run in production. UC's Architect has suggested that they run only subsets of tests.
Which two statements are true regarding running specific tests during deployments? (Choose two.)
Answer options
- A. Specifying the test method is NOT supported in DeployOptions; therefore, specify only the test classes that are required to be executed.
- B. To run a subset of tests, set the RunSpecifiedTests test level on the DeployOptions object and pass it as an argument to deploy() call.
- C. To run a subset of tests, set the RunLocalTests test level on the DeployOptions object and pass it as an argument to deploy() call.
- D. Specify both test classes and individual test methods that are required to be executed, as both are supported in DeployOptions.
Correct answer: A, B
Explanation
Option A is correct because DeployOptions does not support specifying individual test methods, only test classes. Option B is also correct as it accurately describes how to run a subset of tests using the RunSpecifiedTests test level. Options C and D are incorrect because they either reference the wrong test level or suggest methodologies that are not supported in DeployOptions.