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
Rahul Gupta 162Rahul Gupta 162 

I am writing the test class for a batch. But i am facing a problem that test class is not covering the execute method of Batch. I have created the required data and also using Test.startTest() and Test.stopTest(). Please help me out.

Best Answer chosen by Rahul Gupta 162
Avinash BarolaAvinash Barola
Hi Rahul,

It may be possible that start() method in your batch class is not returning any records.

Regards,
Avinash

All Answers

GovindarajGovindaraj
Hi Rahul,

Could you please post us the batch & test classes ?

Thanks,
Govindaraj.S
Avinash BarolaAvinash Barola
Hi Rahul,

It may be possible that start() method in your batch class is not returning any records.

Regards,
Avinash
This was selected as the best answer