function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Andrea mAndrea m 

Test environment colliding with org customizations

hi,

 

We have an app in a managed package and we built a test environment so our test code makes use of this data. But when we try to install our app on customized orgs we sometimes run into issues regarding validation rules and other restrictions made by the sys admins.
how do you usually solve this? We came up with what we thought would be some possible solutions but want to know if we might be missing something.
- remove the onInstall=true from every test method
- remove the creation of standard objects and rely on org pre-existing data.
- document specific details of the standard objects we create, for example state that a the first name of the contact created in our test environment will always be PACKAGE_MYAPP so the sys admins can modify the validation rules to avoid this records.

 

thanks in advance,