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
Abi V 4Abi V 4 

Excute method is not covering in test class for batch class

global void execute(Database.BatchableContext BC, List<sObject> scope){
           List<lead> leads = (List<lead>)scope;
             for(lead ld : leads){
                 if(ld.Status == 'Open' ){
Only this lines of code is not covering in test class ,please suggest me how to solve this.
UC InnovationUC Innovation
May I see the rest of the code as well as the test class?
Amit Chaudhary 8Amit Chaudhary 8
Please check below post for Batch job related query

Please post your full batch job and test class

NOTE:- You need to create your test data according to you Batch job start method