DEVELOPMENT-LIFECYCLE-AND-DEPLOYMENT-ARCHITECT practice question 3 of 30
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 2 answers
Full set: 227 questionsTo shorten deployment times by running a subset of tests, the Metadata API's deploy() call must be configured correctly. The testLevel in the DeployOptions object should be set to RunSpecifiedTests (A). This instructs the platform to only execute the test classes listed in the runTests parameter of the DeployOptions object. The runTests parameter accepts an array of test class names; it does not support specifying individual test methods (D). Therefore, you must provide the names of the specific classes you want to run.
B. RunLocalTests is a different test level that runs all tests in the org except for those in managed packages; it does not run a specified subset.
C. Specifying individual test methods is not supported in the runTests parameter of the DeployOptions object for a Metadata API deployment.
1. Salesforce, Metadata API Developer Guide, "DeployOptions". The documentation specifies the testLevel enum, which includes RunSpecifiedTests. It states, "Only the tests that you specify in runTests are run."
2. Salesforce, Metadata API Developer Guide, "DeployOptions", runTests property. The documentation defines this property as "A list of Apex test classes to run during a deployment... Type: string[]". This confirms only class names are accepted.
3. Salesforce, Apex Developer Guide, "Running a Subset of Tests in a Deployment". This section explicitly states: "To run a subset of tests, set the testLevel deployment option to RunSpecifiedTests and specify the tests to run in the runTests option."
Keep practicing
Take the free DEVELOPMENT-LIFECYCLE-AND-DEPLOYMENT-ARCHITECT practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other DEVELOPMENT-LIFECYCLE-AND-DEPLOYMENT-ARCHITECT practice questions
- Question 1Universal Containers (UC) has multiple development teams that work on separate streams of…
- Question 2In architect is working on a project that relies on functionality that cannot be deployed…
- Question 4What is the process used to initiate a connection for change sets?
- Question 5Universal Containers is looking to construct a continuous integration process to help man…
- Question 6Universal Containers has three types of releases in their release management strategy: da…
- Question 7Universal Containers has multiple project learns building into single org. The project te…
