function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Starz26Starz26 

Test Methods for batch Class and HTTPMock

So is there any way to use HTTPmock methods when writing test methods for a Batch Class?

 

I have put the test.setMock inside the test.startTest

 

There is NO DML going on either in the batch, the setup for the test or the mock interface....

 

I always get the you have uncommitted work pending when the callout is initiated by the execute method of the batch class....

 

 

Starz26Starz26

Anyone?

Alexandre BouhierAlexandre Bouhier
Same issue for me... Did you solve this problem?