You need to sign in to do that
Don't have an account?
jaishri
hello , i have code in which i'm inserting a bulk of data of 200 records in test class of case can anyone tell me where i'm doing wrong it showing error:- inserted failed
Test Class @isTest public static void testmethod3(){ contact con = new contact(); con.LastName = 'Test contact'; con.Email = 'sample@sample.com'; insert con; List<Case> caseList = new List<Case>(); for(Integer i=1; i<=200 ; i++){ Case cs = new Case(); cs.Status = 'New'; cs.Origin = 'Phone'; cs.ContactId =con.Id; caseList.add(cs); } Test.startTest(); insert caseList; Test.stopTest(); }
Try Below Code Coverage 95%
Made Small Changes In Main Class In Highlight Please Mark It As Best Answer If It Helps
Thank You!
All Answers
Refresh The Dev Console And Run Test Again
Please Mark It As Best Answer If It Helps
Thank You!
It is not working
Can you check, is there any mandaory fields are missing in the test data for conact & case objects.
Thanks!!
I have write the mandatory field in test class
Can you share the error on which line you are getting?
Thanks!!
As per your screenshot, it seems like you have an issue with sendemail.
Open that log and check where exactly its failing in the caseTrigger.
Thanks!!
Try Below Code Coverage 95%
Made Small Changes In Main Class In Highlight Please Mark It As Best Answer If It Helps
Thank You!
I have only one test class in my org
Thanks