I have a AccountTest class which run with more than 75% coverage in dev env. But when I tried same class in a another sandbox without any code change give this too many soql error. Can someone have idea why the issue comes ?
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It only takes a minute to sign up.
Sign up to join this communityI have a AccountTest class which run with more than 75% coverage in dev env. But when I tried same class in a another sandbox without any code change give this too many soql error. Can someone have idea why the issue comes ?
seeAllData=true
(which you should never use unless you know for certain that it's required for the feature you're testing) is an easy way to get differing results in different orgs.Test.startTest()
andstopTest()
in your test methods? These give you a fresh set of limits with every test. Differences in Triggers/Classes usually are what cause such an issue.