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
Ankit BobdeAnkit Bobde 

External Entry Point Error Continued....

Here is my test class

Here is my test class
 
@isTest
private class TestAMCLeadCreationBatch {

   static testMethod void myUnitTest() {
       
        list<Lead> tempLead = new list<Lead>();
        list<smagicinteract__smsMagic__c> smsObjectList = new list<smagicinteract__smsMagic__c>();
        
        User u = [Select id
                     from
                     User
                     where
                     name='Balamurugan Nadar'];
        system.runAs(u)
        {    
            Profile p = [select id
                                from
                                Profile
                                where
                                name='BMCC system Admin SSO'];
                                     
             User uBDE = new user(alias = 'test1234', email='test1234@noemail.com',related_team__c = 'BDE', Service_Segment__c ='Compliance Services',
                                emailencodingkey='UTF-8', firstName='Piyush', lastname='Pakhale', languagelocalekey='en_US', MobilePhone='9789654123',
                                localesidkey='en_IN', profileid = p.Id, country='India', Registration__c = true,
                                timezonesidkey='Asia/Kolkata', username='test_g@noemail.com');
            insert uBDE;
            
            Contact tempContact = new Contact();
            tempContact.Salutation='Mr.';
            tempContact.FirstName='Ankit';
            tempContact.LastName='Bobde';
            tempContact.Email='ankit.bobde@bmcgroup.in';
            insert tempContact;

           Operation__c tempOperation= new Operation__c();
            tempOperation.contact__c=tempContact.id;
            tempOperation.Enquiry_for__c='Pvt. Ltd. Registration';
            tempOperation.ROC_Name__c = 'Maharashtra';
            tempOperation.Incorporation_Date__c=system.today();
            tempOperation.Auth_Capital__c=1000;
            tempOperation.Paid_Up_Capital__c=1000;
            tempOperation.Name='BMCTEST';
            tempOperation.New_Company_Name__c='ABC';
            insert tempOperation;
            
            tempOperation.Auth_Capital__c=2000;
            tempOperation.isBulkcreated__c=true;
            update tempOperation;
            
            
            
            for(integer i=0; i<100; i++){
                Lead scheduleLead = new Lead();
                scheduleLead.Enquiry_For__c =  'Pvt. Ltd. AMC';
                scheduleLead.LastName='.';
                scheduleLead.Company='.';
                scheduleLead.ownerId = uBDE.id;
                scheduleLead.Created_Through__c = 'BDE';
                tempLead.add(scheduleLead);    
            
            }
            insert tempLead;
            
       
            test.startTest();
        
            AMCLeadCreationBatch lrbs = new AMCLeadCreationBatch();
            id batchProcessID = Database.executeBatch(lrbs);
        
            test.stopTest();
        }
    }
}

Any Help would be appreciated
 
viruSviruS
Check Debug log and see what statement causing  exact exception ..