PDI · Question #150
What should a developer use to script the deployment and unit test execution as part of continuous integration?
The correct answer is C. Salesforce CLI. To script deployments and unit test execution as part of a continuous integration process, a developer should utilize the Salesforce CLI due to its command-line automation capabilities.
Question
What should a developer use to script the deployment and unit test execution as part of continuous integration?
Options
- ADeveloper Console
- BExecute Anonymous
- CSalesforce CLI
- DVS Code
How the community answered
(47 responses)- A2% (1)
- B2% (1)
- C89% (42)
- D6% (3)
Why each option
To script deployments and unit test execution as part of a continuous integration process, a developer should utilize the Salesforce CLI due to its command-line automation capabilities.
The Developer Console is a browser-based IDE primarily used for interactive development and debugging, not for scripting automated CI/CD processes.
Execute Anonymous is a feature for running single lines or blocks of Apex code, not a tool for scripting an entire deployment and test execution process within CI.
The Salesforce CLI provides a comprehensive set of commands for deploying source code and executing Apex tests (`sfdx force:source:deploy`, `sfdx force:apex:test:run`), making it ideal for scripting automated CI/CD pipelines.
VS Code is an integrated development environment (IDE) for writing code, and while it integrates with Salesforce, it's not a scripting tool itself for CI/CD automation; it relies on tools like the Salesforce CLI.
Concept tested: Salesforce CLI for CI/CD automation
Source: https://developer.salesforce.com/docs/atlas.en-us.sfdx_cli_reference.meta/sfdx_cli_reference/cli_reference.htm
Topics
Community Discussion
No community discussion yet for this question.