1

I'm pretty new to the salesforce environment and in my team we are using "org development model". Its not possible for us now to move to package base development model due to massive org which totally depends on different set of classes inside and finding all the connectivity is bigger headache for now. So we are planning to go ahead with "org development model". Here I'm finding few issues and those are listed below

  1. Seeding developer own sandbox is difficult because we have only three org (dev, test and prod) and high cost incur if i need need to seed my developer sandbox with prod data. How do I over come this ? any script or tools available ?
  2. Our org is massive so we can’t use package based development. So you have to do partial deployments of only changed metadata - How do I find changed data ? and take that alone for my deployment (ci/cd)
  3. Unit test taking nearly 4 hrs to run due to poor test classes I hope. Do we have any tools or plugins to find the poor test classes written in source code ? or How do I overcome this case ? I think few classes depends on other classes and that consume a lot of time here. Need better solution.
1
  • It is preferred if you can post separate questions instead of combining your questions into one. That way, it helps the people answering your question and also others hunting for at least one of your questions. Thanks!
    – identigral
    Jul 15 '20 at 20:24
1

Seeding developer own sandbox is difficult because we have only three org (dev, test and prod) and high cost incur if i need need to seed my developer sandbox with prod data. How do I over come this ? any script or tools available ?

You should only need a few hundred records. Salesforce DX is great for doing this via its various data import tools.

Our org is massive so we can’t use package based development. So you have to do partial deployments of only changed metadata - How do I find changed data ? and take that alone for my deployment (ci/cd)

Use Scratch Orgs. You can use package-based deployments, but it will take some time. Rome was not built in a day, nor will your packages. But if you start now, you will eventually reach the point where all your deployments will be package-based.

Unit test taking nearly 4 hrs to run due to poor test classes I hope. Do we have any tools or plugins to find the poor test classes written in source code ? or How do I overcome this case ? I think few classes depends on other classes and that consume a lot of time here. Need better solution.

Running the tests in Salesforce DX includes execution time and code coverage (optional). The two largest parts of bad testing are inefficient code and large triggers. Use a "trigger framework" that can selectively disable triggers during the test initialization routines (e.g. testSetup), and focus on smaller tests. Also, package-based deployment moves the testing from deployment time to "Release" time (when you "promote" your package). This means your production deployments can be as short as a few minutes.


I realize that many orgs have apprehension about moving to DX. We personally have 35,000 or so metadata files in our repo that we're attempting to package, and the going has been slow and relatively painful. However, the long term gains are worth the trouble, and I strongly consider you give it another look.

Your first package can simply be Custom Objects and Custom Fields, then expand to other types (Page Layouts, Visualforce, Lightning, etc) as you continue development. The great part about package-based deployments is you can do it in phases. There is no rule that says you must do it overnight or suffer consequences.


If you absolutely don't want to spend the time, look at the AppExchange. Products like GearSet and AutoRabit (note: please do your own product research, this is not meant to be a recommendation on my behalf, just what I'm familiar with) can do partial deployments and greatly assist with CI/CD and other processes.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.