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
ColbridgeColbridge 

code coverage in else

else if line is getting covered and is shown in blue/green, but the next two lines are in red. How to get that covered?
 
} else if ((checkedSummaryPlanIds == totalSummaryPlanIds) && (planIdMatch == false)) {
      skippedRecords += ddRecs.Plan_id__c + ' - ' + ddRecs.account_name__c + '\n'; // concatinated list of skipped records plan ids
      totalSkippedCtr++;
}

 
Best Answer chosen by Colbridge
AbhinavAbhinav (Salesforce Developers) 
that means its checking your condition if ((checkedSummaryPlanIds == totalSummaryPlanIds) && (planIdMatch == false))  but its not getting true so other two lines are not covered.

Add you test data in sych way that else if conditions evaluates to be true.

Thanks!