+ Start a Discussion
akhil Vakhil V 

101 soql in test class

hi,
How to over come 101 soql in test class?
ManojjenaManojjena
Hi Akhil,

Try to use Test.startTest() and Test.stopTest() in each test method .It will help .

 
akhil Vakhil V
Hi Manoj,

I wrote a test class which doesnt have single Query in that.Also am getting error as 101 soql 
Test method means ?
test.startTest();
statitc testmethod method1I(){
}
Tets.stopTest();
like this ?
ManojjenaManojjena
Hi Akhil ,

When ever you will insert a record from test class all trigger related to that object and event will fire and all SOQL inside trigger will consider .
You can create a debug log and check how many trigger got fire while executing test case .

Thnaks 
Manoj