Home > database >  Salesforce : Enable 75% test coverage while deployment in DE org
Salesforce : Enable 75% test coverage while deployment in DE org

Time:08-24

I'm using sfdx to deploy my components and classes to a developer edition org, but while deploying it doesn't check 75% test coverage of apex classes, is there any setting to enable test coverage while deployment or DE Org doesn't support test coverage checks while deployment?

CodePudding user response:

You can deploy to developer edition / trailhead playground orgs without code coverage or edit apex straight in "prod" (in setup or developer console). Developer Editions have no sandboxes and concept of scratch orgs is relatively new so being able to work in "prod" was the only option. Plus well, it helps with rapid prototyping of ideas without the "hurdle" of unit tests.

If you'd be eventually making a managed package - don't worry. During process of packaging new version you'd have the usual checks (does everything compile, do all tests pass, 75% overall and at least 1% on triggers).

You can choose to run local tests while deploying but I don't think there's native way to enforce 75% threshold. Maybe something in your CI tool could help (GitHub actions or what have you)

  • Related