nerdexam
Salesforce

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.

Submitted by naveen.iyer· Apr 18, 2026Testing, Debugging, and Deployment

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)
  • A
    2% (1)
  • B
    2% (1)
  • C
    89% (42)
  • D
    6% (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.

ADeveloper Console

The Developer Console is a browser-based IDE primarily used for interactive development and debugging, not for scripting automated CI/CD processes.

BExecute Anonymous

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.

CSalesforce CLICorrect

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.

DVS Code

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

#Developer Console#Unit Testing#Deployment#Continuous Integration

Community Discussion

No community discussion yet for this question.

Full PDI Practice