How i can retrieve DeployOptions metadata with VS Code and edit it? Or How I can deploy a class to Production without running any tests?

  • Deploy a class without running any tests? Not possible. Why would you want to do that?
    – Adrian Larson
    Commented Dec 17, 2019 at 22:01
  • I am trying to delete a class, test class is failing. So need some kind of workaround.I am using VS Code. Commented Dec 17, 2019 at 22:09
  • Have you looked at the documentation on Destructive Change Sets?
    – Adrian Larson
    Commented Dec 17, 2019 at 22:13

1 Answer 1


DeployOptions is not a Metadata API entity you can retrieve and edit. It is an object passed to the deploy() Metadata API call.

If deploying using the Salesforce DX CLI (sfdx), such as via force:source:deploy, you use the options

-l | --testlevel TESTLEVEL


-r | --runtests RUNTESTS

options to control which tests you wish to run during deployment. -r is used only if you specify -l RunSpecifiedTests. Running specified tests may in some circumstances allow you to perform deployments that are otherwise blocked by issues with existing unit tests.

There is no way in any API to perform an Apex deployment to a production Salesforce org without running tests, nor should there be.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .