You need to sign in to do that
Don't have an account?
sandy k
I have trigger on Opportunity object and batch class which updates the same Opportunity object, how can I write test class only for batch class
Hi Guys,
I have trigger on Opportunity object with events insert,update and delete and batch class which updates the same Opportunity object, how can I write test class only for batch class.
When I am writing test class coverage only for batch class and inserting test Opportunity data, the test code covering trigger also and throw error System.LimitException: Too many SOQL queries: 101. How can I skip executing trigger code from test class execution which should only cover batch class. How can I achieve this
I have trigger on Opportunity object with events insert,update and delete and batch class which updates the same Opportunity object, how can I write test class only for batch class.
When I am writing test class coverage only for batch class and inserting test Opportunity data, the test code covering trigger also and throw error System.LimitException: Too many SOQL queries: 101. How can I skip executing trigger code from test class execution which should only cover batch class. How can I achieve this
Have you tried with Test.startTest() & Test.stopTest() in your test menthod? Thanks!!