You need to sign in to do that
Don't have an account?
Shruthi GM 4
I am getting too many soql queries error when am running the test classes.
How to get rid of this error?
Can anyone please suggest way to remove this error?!
Thanks inadvance.
Can anyone please suggest way to remove this error?!
Thanks inadvance.
Maybe your Test Class is not Bulkified. Make sure that you dont have SOQL Queries inside For loops or any other iterations.
You can share your test Class for better solution.
Best Regards,
BALAJI
As recommended by Balaji, the first thing to do is to bulkify the code. Additionally you can use Test.startTest() and Test.stopTest() methods to expand the number of SOQLs you can use in a Test method.
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_testing_tools_start_stop_test.htm
Different test cases can be broken down into multiple test methods for better results.