Find your content:

Search form

You are here

Deployment of managed package

 
Share

I have a managed package which is going to be installed in several enterprise orgs.

Salesforce while deployment all unit tests will be run and if they all success with 75% code coverage then only you can deploy.

My question is "Do all tests run in dev org only or they also run enterprise org while installing the package?"


Attribution to: doga

Possible Suggestion/Solution #1

If you ask : will my test run be executed on the dev environment only? the answer is NO, it will also be executed when deploying to the prod env.

When deploying your package to the production env, your test class/functions are executed as well.

Always remember to use test data correctly


Attribution to: Saariko

Possible Suggestion/Solution #2

Whenever you deploy managed package code, your tests will always be executed against the target org you are deploying into.

If you are installing your managed package into another org, then your tests will only be executed against the target org if you explicitly request them to be run on install using the @isTest(OnInstall=true) annotation.


Attribution to: zachelrath

Possible Suggestion/Solution #3

75% test coverage is required for all classes included in your managed package application.

When you add components(apex classes, triggers etc) to package, then test coverage for all these classes is calculated and not all of your developer org classes.

Hope this helps :)


Attribution to: Devendra
This content is remixed from stackoverflow or stackexchange. Please visit https://salesforce.stackexchange.com/questions/1632

My Block Status

My Block Content