+ Start a Discussion
Manjunath reddy 25Manjunath reddy 25 

Test class for Batch class not working.


 
 
@istest
public class GSDResourceSkillMappingBatchTest{
    //@isTest(seealldata = false)
    public static testMethod void skillMapTest(){
       
        List<GSD_RDPM_Replication_Detail__c> detailRecords = new list<GSD_RDPM_Replication_Detail__c>();
        
        HPTriggerFrameworkObjectMapping__c trigFramegsdres = new HPTriggerFrameworkObjectMapping__c();
        trigFramegsdres.name = 'GSD_Resource__c';
        trigFramegsdres.DispatcherCalssName__c = 'GSDNewResource';
        
        insert trigFramegsdres;
        
        HPTriggerFrameworkObjectMapping__c objskillmaster= new HPTriggerFrameworkObjectMapping__c();
        objskillmaster.Name='GSD_Skill_Master__c';
        objskillmaster.DispatcherCalssName__c='GSDSKillMaster';
        
        insert objskillmaster;
            
        HPTriggerFrameworkObjectMapping__c objfsm= new HPTriggerFrameworkObjectMapping__c();
        objfsm.Name='CKSW__Skill__c';
        objfsm.DispatcherCalssName__c='GSDFSMSkill';
        
        insert objfsm;
            
        HPTriggerFrameworkObjectMapping__c objsrm= new HPTriggerFrameworkObjectMapping__c();
        objsrm.Name='pse__Skill__c';
        objsrm.DispatcherCalssName__c='GSDSRMSkill';
        
        insert objsrm;    
        
        HPTriggerFrameworkObjectMapping__c trigFrame = new HPTriggerFrameworkObjectMapping__c();
        trigFrame.name = 'CKSW__Engineer_Equipment__c';
        trigFrame.DispatcherCalssName__c = 'GSDResource';
        
        insert trigFrame;
        
        HPTriggerFrameworkObjectMapping__c objgrsm = new HPTriggerFrameworkObjectMapping__c();
        objgrsm.Name='GSD_Resource_Skills_mapping__c';
        objgrsm.DispatcherCalssName__c='GSDResourceSkillMapping';
        
        insert objgrsm;
        
        HPTriggerFrameworkObjectMapping__c mapping = new HPTriggerFrameworkObjectMapping__c();
        mapping.name = 'GSD_Manager_to_District__c';
        mapping.DispatcherCalssName__c = 'GSDManagerToDistrict';
        
        insert mapping;
        
        HPTriggerFrameworkObjectMapping__c psereq = new HPTriggerFrameworkObjectMapping__c();
        psereq.name = 'pse__Resource_Request__c';
        psereq.DispatcherCalssName__c = 'GSDResourceRequest';
        
        insert psereq;
        
        EngineProperties__c ep = new EngineProperties__c(Name='NextUserSet');
        ep.DoubleValue__c = 250;
        ep.Value__c = 'none';
        
        insert ep;
        
        Global_Config__c gc = new Global_Config__c();
        gc.Mute_Triggers__c= false;
        
        insert gc;
        
        GSDResourceMapping__c resmapping = new GSDResourceMapping__c();
        resmapping.name = 'GSD_Mobile_User_Setting__c';
        resmapping .Resource_Field_Name__c = 'CKSW__ClickMobile_User_Setting__c';
        
        insert resmapping ;
        
        GSDResourceMapping__c resmapping1 = new GSDResourceMapping__c();        
        resmapping1.name = 'User__c';       
        resmapping1 .Resource_Field_Name__c = 'CKSW__User__c';      
        
        insert resmapping1 ; 
        
        GSDResourceMapping__c resmapping2 = new GSDResourceMapping__c();
        resmapping2.name = 'GSD_Mobile_User_Setting__c';
        resmapping2.Resource_Field_Name__c = 'CKSW__ClickMobile_User_Setting__c';
        insert resmapping2 ;
        
        GSD_Support_Activity_Mapping__c supportActivity = new GSD_Support_Activity_Mapping__c(name='CSC',Support_Activity__c='Troubleshoot and Resolution (Remote/local)');
        
        insert supportActivity;
        
        UserMatchFields__c uMFObj=new UserMatchFields__c(name='case1',Base__c='case',Label__c='BG',Order__c=1,Path__c='BG__c',Type__c='Picklist');
        
        insert uMFObj;
        
        GSD_Resource_OAE_Mapping__c grem = new GSD_Resource_OAE_Mapping__c();
        grem.Name='CSC_Onshore_Countries__c';
        grem.OAE_Base_Object__c='Case';
        grem.OAE_Parameter__c='Onshore Calculation';
        
        insert grem;
        
        GSD_Resource_OAE_Mapping__c grem1 = new GSD_Resource_OAE_Mapping__c();
        grem1.Name='CSC_Origins_Supported__c';
        grem1.OAE_Base_Object__c='Case';
        grem1.OAE_Parameter__c='Case Origin';
        
        insert grem1;
        
        GSD_Resource_OAE_Mapping__c  grem2 = new GSD_Resource_OAE_Mapping__c();
        grem2.Name='CSC_Routing_Role__c';
        grem2.OAE_Base_Object__c='Case';
        grem2.OAE_Parameter__c='Support Type';
        
        insert grem2;
        
        GSD_Resource_OAE_Mapping__c grem3 = new GSD_Resource_OAE_Mapping__c();
        grem3.Name='CSC_Service_Portfolio__c';
        grem3.OAE_Base_Object__c='Case';
        grem3.OAE_Parameter__c ='Service Portfolio';
        
        insert grem3;
        
        GSD_Resource_OAE_Mapping__c grempriv = new GSD_Resource_OAE_Mapping__c();
        grempriv.Name='CSC_Supports_Private_Cases__c';
        grempriv.OAE_Base_Object__c='Case';
        grempriv.OAE_Parameter__c='Private Case Routing';
        
        insert grempriv;
        
        GSD_Resource_OAE_Mapping__c grem4 = new GSD_Resource_OAE_Mapping__c();
        grem4.Name='CSC_Support_Countries__c';
        grem4.OAE_Base_Object__c='Case';
        grem4.OAE_Parameter__c='Asset Country';
        
        insert grem4;
        
        GSD_Resource_OAE_Mapping__c grem5 = new GSD_Resource_OAE_Mapping__c();
        grem5.Name='Exception Routing Formula';
        grem5.OAE_Base_Object__c='Case';
        grem5.OAE_Parameter__c='Exception Routing Formula';
        
        insert grem5;
        
        GSD_Resource_OAE_Mapping__c gremlang = new GSD_Resource_OAE_Mapping__c(Name='Language');
        gremlang.OAE_Base_Object__c ='Case';
        gremlang.OAE_Parameter__c ='Requestor Language';
        
        insert gremlang;
        
        GSD_Resource_OAE_Mapping__c grem6 = new GSD_Resource_OAE_Mapping__c();
        grem6.Name='Outage__c';
        grem6.OAE_Parameter__c='Outage Routing';
        grem6.OAE_Base_Object__c='Case';
        
        insert grem6;
        
        GSD_Resource_OAE_Mapping__c grem7 = new GSD_Resource_OAE_Mapping__c();
        grem7.Name='pm_oid__c';
        grem7.OAE_Base_Object__c='Case';
        grem7.OAE_Parameter__c='Product Series';
        
        insert grem7;
          
        GSD_Resource_OAE_Mapping__c grem8 = new GSD_Resource_OAE_Mapping__c();
        grem8.Name='Technology';
        grem8.OAE_Base_Object__c='Case';
        grem8.OAE_Parameter__c='Routing Technology';
        
        insert grem8;
        system.assert(grem8.id!=null);
        
        GSD_RDPM__c gsdRdpm= new GSD_RDPM__c();
        gsdRdpm.Name='GSD_RDPM';
        gsdRdpm.Manage_Size__c=2;
        
        insert gsdRdpm;
        
        GSD_RDPM__c clickLimit= new GSD_RDPM__c();
        clickLimit.Name='Click Skill Limit';
        clickLimit.Manage_Size__c=2;
        
        insert clickLimit;
        
        GSD_RDPM__c cscLimit= new GSD_RDPM__c();
        cscLimit.Name='CSC Skill Limit';
        cscLimit.Manage_Size__c=2;
        
        insert cscLimit;
        
        GSD_RDPM__c gsdFSMMute= new GSD_RDPM__c();
        gsdFSMMute.Name='FSM_Skill_Replication';
        gsdFSMMute.Replication_Enable__c=True;
        
        insert gsdFSMMute;
        
        GSD_RDPM__c gsdCSCMute= new  GSD_RDPM__c();
        gsdCSCMute.Name='CSC_Skill_Replication';
        gsdCSCMute.Replication_Enable__c=True;
        
        insert gsdCSCMute;
        
        GSD_RDPM__c batchCustomsetting  = new GSD_RDPM__c();
        batchCustomsetting .Name = 'batch';
        batchCustomsetting.Time_Interval__c = 2;
         
        insert batchCustomsetting;
        
                
        
        }
        
        public static testMethod void skillMapBatchTest(){
        
            skillMapTest();
            Profile cscManagerPro = [SELECT Id, Name FROM Profile WHERE Name = 'GSD CSC Support Engineer Standard' LIMIT 1];        
            User cscProfileUser = new User(profileId = cscManagerPro.id, username = 'hfdsftestemailu98534785834@hp.com', email = 'testemailu98@hp.com',emailencodingkey = 'UTF-8',UserRoleId = UserInfo.getUserRoleId (), localesidkey = 'en_US',languagelocalekey = 'en_US', timezonesidkey = 'America/Los_Angeles',
                                           alias='csput78', lastname='lastname8', Adoption_Role_Type__c = 'IT', Email_Address__c = 'testemailu98@hp.com',RMR_Primary_Operational_Role__c = 'Competency Center Engineer');
                
                insert cscProfileUser; 
                system.assert(cscProfileUser.Id!=null);
                
            Profile fsmManagerPro = [SELECT Id, Name FROM Profile WHERE Name = 'GSD FSM Sub Regional Resource' LIMIT 1];        
            User fsmProfileUser = new User( profileId = fsmManagerPro.id, username = 'testemail22ksdhfjkasd@hp.com', email = 'testemail22@hp.com',UserRoleId = UserInfo.getUserRoleId (), 
                                            emailencodingkey = 'UTF-8', localesidkey = 'en_US',languagelocalekey = 'en_US', timezonesidkey = 'America/Los_Angeles',
                                            alias='cspu22', lastname='end', Adoption_Role_Type__c = 'IT', Email_Address__c = 'testemail3@hp.com',Legacy_Employee_Ref__c='123451', 
                                            rmr_primary_operational_role__c  = 'Technical Consultant');
                
                insert fsmProfileUser;
            
            Profile srmManagerPro = [SELECT Id FROM Profile WHERE Name='IT Administrator' LIMIT 1];
            User srmProfileUser = new User(profileId = srmManagerPro.id, username = 'test123bbc12@hp.com', email = 'ttKestemail09@hp.com', 
                            emailencodingkey = 'UTF-8', localesidkey = 'en_US',languagelocalekey = 'en_US', timezonesidkey = 'America/Los_Angeles',
                            alias='cspu', lastname='lastname123', Adoption_Role_Type__c = 'IT', Email_Address__c = 'Sjtestemail18@hp.com');
                
            insert srmProfileUser;
            
             GSD_RMR_Roles__c gsdrmrCSC = new GSD_RMR_Roles__c();           
                gsdrmrCSC.name='CSC';
                gsdrmrCSC.RMR_Roles__c='Competency Center Engineer';
                insert gsdrmrCSC;                
            
            GSD_RMR_Roles__c gsdrmrFSM = new GSD_RMR_Roles__c();
                gsdrmrFSM.Name='FSM';
                gsdrmrFSM.RMR_Roles__c='Technical Consultant';
                insert gsdrmrFSM;
            
            GSD_RMR_Roles__c gsdrmrSRM = new GSD_RMR_Roles__c();
                gsdrmrSRM.name='SRM';
                gsdrmrSRM.RMR_Roles__c='Account Support Manager,Technical Consultant,Implementation project manager,Deployment Coordinator,Integration Center Project Manager,Customer Deployment Manager,Deployment Services Engineer,Solution Architect,Account Delivery Manager';
                insert gsdrmrSRM;
            
            GSD_RMR_Roles__c gsdrmrSRM1 = new GSD_RMR_Roles__c();
                gsdrmrSRM1.name='SRM1';
                gsdrmrSRM1.RMR_Roles__c='Account Support Manager';
                insert gsdrmrSRM1;
            UserData__c userData = new UserData__c();
            userData.User__c = cscProfileUser.id;
            insert userData;
            
            UserData__c userData1 = new UserData__c();
            userData1.User__c = fsmProfileUser.id;
            insert userData1;
            
            UserData__c userData2 = new UserData__c();
            userData2.User__c = srmProfileUser.id;
            insert userData2;
            
        
            
            
            World_Region__c newRegion1 = new World_Region__c(Name='AD', Country_Name__c = null);
                insert newRegion1;
            
            GSD_Business_Center__c newBusiness1= new GSD_Business_Center__c(Name='INDIA-INDIA', Business_Center_Key__c=35684933);
                insert newBusiness1;
        

            CKSW__Region__c regionobj1 = new CKSW__Region__c();
                regionobj1.Name='INDIA-INDIA';
                regionobj1.Business_Center__c=newBusiness1.Id;
                insert regionobj1;
                system.debug('regionobj1'+regionobj1);
                
            CKSW__District__c newDistrict1 = new CKSW__District__c();
                newDistrict1.Name = 'Karnataka';
                newDistrict1.CKSW__Region__c=regionobj1.Id;
                insert newDistrict1;
            
            CKSW__Engineer_Equipment__c newResource = new CKSW__Engineer_Equipment__c();
                newResource.Name='Test Eng1';
                newResource.Mobile__c= '(909) 999-9999';
                newResource.Travel_Mode__c = 'ON';
                newResource.Travel_Policy__c='Travel in Company Time';
                newResource.CKSW__User__c= UserInfo.getUserId();
                newResource.CKSW__District__c = newDistrict1.Id;
                newResource.cksw__region__c = regionobj1.Id;          
                insert newResource;
            
            GSD_Manager_to_District__c testManager1 = new GSD_Manager_to_District__c(Name = 'TestManager1', User__c = UserInfo.getUserId(), CKSW_District__c = newDistrict1.Id);    
                insert testManager1;    
            
            World_Region__c WorldRegion = new World_Region__c();
            WorldRegion.name = 'california';
            insert WorldRegion;
            
            String recTypeId = Schema.SObjectType.GSD_Resource__c.getRecordTypeInfosByName().get('FSM/CSC/SRM Engineers').getRecordTypeId();
        if(!Test.isRunningTest()){
            GSD_Resource__c RDPMresource = new GSD_Resource__c(); 
            RDPMresource .recordTypeID = recTypeId ;
            RDPMresource .User__c = fsmProfileUser.Id;
            RDPMresource .Mobile_Phone__c = '8197469999';
            RDPMresource .Country_ISO__c = WorldRegion.Id;
            RDPMresource .CSC_Support_Countries__c = 'Afghanistan;Aland Islands;Albania';      
            RDPMresource .CSC_Service_Portfolio__c = 'Datacenter Care;Datacenter Hyperscale;Contract';         
            RDPMresource .Outage__c = TRUE;        
            RDPMresource .CSC_Routing_Role__c = 'Diagnosis';   
            RDPMresource .Country_Citizenship_ISO_Code__c = WorldRegion.Id;
            RDPMresource .Region__c = regionobj1.Id;
            RDPMresource .Primary_District__c = newDistrict1.Id;
            RDPMresource .Resource_ID__c = '1111';   
            RDPMresource .Active__c = TRUE;
            RDPMresource .FSM_Resource__c = TRUE;
            RDPMresource .SRM_Resource__c=TRUE;    
            
            insert RDPMresource ; 
            
            GSD_Skill_Master__c skill1 = new GSD_Skill_Master__c();        
            skill1.Name='testnonproduct1';
            //skill1.Skill_Type__c='Non-Product';
            skill1.Skill_Name__c='New skill1';
            skill1.Skill_Category__c='Language';
                         
            insert skill1;
            
            GSD_Resource_Skills_mapping__c RDPMresourceSkillsMapping = new GSD_Resource_Skills_mapping__c();
            RDPMresourceSkillsMapping .Skill_Name__c = skill1.Id;
            RDPMresourceSkillsMapping .Standard__c=TRUE;
            RDPMresourceSkillsMapping .Resource_ID__c = RDPMresource .Id;
            RDPMresourceSkillsMapping .Responsibility_Skill_Level__c='0';
            RDPMresourceSkillsMapping .Skill_Category__c = 'Language';
            
            insert RDPMresourceSkillsMapping ; 
            
            
           GSD_RDPM_Replication_Summary__c RDPMreplicationSummary= new GSD_RDPM_Replication_Summary__c();     
           RDPMreplicationSummary.GSD_Resource__c = RDPMresource .Id;
           RDPMreplicationSummary.Event_Type__c = 'Insert';
           RDPMreplicationSummary.CSC__c = TRUE;
           RDPMreplicationSummary.FSM__c = FALSE;
           RDPMreplicationSummary.SRM__C = FALSE;  
            
           insert RDPMreplicationSummary;        
                
          /* GSD_RDPM_Replication_Detail__c RDPMreplicationDetail = new GSD_RDPM_Replication_Detail__c();
           RDPMreplicationDetail .Action__c = 'Info';
           RDPMreplicationDetail .Status__c = 'Completed';
           RDPMreplicationDetail .GSD_Rdpm_Replication_Summary__c = RDPMreplicationSummary.Id;
           RDPMreplicationDetail .GSD_Resource_Skills_mapping__c = RDPMresourceSkillsMapping .Id;
           //gsdrdpmrepdetail1.GSD_Resource_User__c = cscProfileUser.Id;
           RDPMreplicationDetail .Slave_System__c = gsdrmrFSM .Name;
           RDPMreplicationDetail .Slave_System_ID__c = gsdrmrFSM .Id;
            
           insert RDPMreplicationDetail ;*/
           
           GSD_Business_Center__c newBusiness3= new GSD_Business_Center__c(Name='EMEA', Business_Center_Key__c=35684934);
           insert newBusiness3;
           
           CKSW__Region__c regionobj3= new CKSW__Region__c();
           regionobj3.Name='US';
           regionobj3.Business_Center__c=newBusiness3.Id;
           insert regionobj3;
            
           CKSW__District__c newDistrict3= new CKSW__District__c();
           newDistrict3.Name = 'AP';
           newDistrict3.CKSW__Region__c=regionobj3.Id;
           insert newDistrict3;
           
           World_Region__c WorldRegion1 = new World_Region__c();
           WorldRegion1.name = 'Loss angels';
           insert WorldRegion1;
           
           
            GSD_Resource__c RDPMresource1 = new GSD_Resource__c(); 
            RDPMresource1 .recordTypeID = recTypeId ;
            RDPMresource1 .User__c = srmProfileUser .Id;
            RDPMresource1 .Mobile_Phone__c = '8197469999';
            RDPMresource1 .Country_ISO__c = WorldRegion1.Id;
            RDPMresource1 .CSC_Support_Countries__c = 'Afghanistan;Aland Islands;Albania';      
            RDPMresource1 .CSC_Service_Portfolio__c = 'Datacenter Care;Datacenter Hyperscale;Contract';         
            RDPMresource1 .Outage__c = TRUE;        
            RDPMresource1 .CSC_Routing_Role__c = 'Diagnosis';   
            RDPMresource1 .Country_Citizenship_ISO_Code__c = WorldRegion1.Id;
            RDPMresource1 .Region__c = regionobj3.Id;
            RDPMresource1 .Primary_District__c = newDistrict3.Id;
            RDPMresource1 .Resource_ID__c = '1111';   
            RDPMresource1 .Active__c = TRUE;
            RDPMresource1 .FSM_Resource__c = TRUE;
            RDPMresource1 .SRM_Resource__c=TRUE;    
            
            insert RDPMresource1 ; 
           
           GSD_RDPM_Replication_Summary__c RDPMreplicationSummary1= new GSD_RDPM_Replication_Summary__c();   
             
           RDPMreplicationSummary1.GSD_Resource__c = RDPMresource1 .Id;
           RDPMreplicationSummary1.Event_Type__c = 'Insert';
           RDPMreplicationSummary1.CSC__c = TRUE;
           RDPMreplicationSummary1.FSM__c = FALSE;
           RDPMreplicationSummary1.SRM__C = FALSE;  
            
           insert RDPMreplicationSummary1;  
           
           GSD_Business_Center__c newBusiness2= new GSD_Business_Center__c(Name='US', Business_Center_Key__c=35684935);
           insert newBusiness2;
           
           CKSW__Region__c regionobj2= new CKSW__Region__c();
           regionobj2.Name='UK';
           regionobj2.Business_Center__c=newBusiness2.Id;
           insert regionobj2;
            
           CKSW__District__c newDistrict2 = new CKSW__District__c();
           newDistrict2.Name = 'TN';
           newDistrict2.CKSW__Region__c=regionobj2.Id;
           insert newDistrict2;
           
           World_Region__c WorldRegion2 = new World_Region__c();
           WorldRegion2.name = 'Loss angels';
           insert WorldRegion2;
           
          
            
            GSD_Resource__c RDPMresource2 = new GSD_Resource__c(); 
            RDPMresource2 .recordTypeID = recTypeId ;
            RDPMresource2 .User__c = cscProfileUser.Id;
            RDPMresource2 .Mobile_Phone__c = '8197469999';
            RDPMresource2 .Country_ISO__c = WorldRegion2.Id;
            RDPMresource2 .CSC_Support_Countries__c = 'Afghanistan;Aland Islands;Albania';      
            RDPMresource2 .CSC_Service_Portfolio__c = 'Datacenter Care;Datacenter Hyperscale;Contract';         
            RDPMresource2 .Outage__c = TRUE;        
            RDPMresource2 .CSC_Routing_Role__c = 'Diagnosis';   
            RDPMresource2 .Country_Citizenship_ISO_Code__c = WorldRegion.Id;
            RDPMresource2 .Region__c = regionobj1.Id;
            RDPMresource2 .Primary_District__c = newDistrict1.Id;
            RDPMresource2 .Resource_ID__c = '1111';   
            RDPMresource2 .Active__c = TRUE;
            RDPMresource2 .FSM_Resource__c = TRUE;
            RDPMresource2 .SRM_Resource__c=TRUE;    
            
            insert RDPMresource2 ; 
           
           GSD_RDPM_Replication_Summary__c RDPMreplicationSummary2= new GSD_RDPM_Replication_Summary__c();     
           RDPMreplicationSummary2.GSD_Resource__c = RDPMresource2 .Id;
           RDPMreplicationSummary2.Event_Type__c = 'Insert';
           RDPMreplicationSummary2.CSC__c = TRUE;
           RDPMreplicationSummary2.FSM__c = FALSE;
           RDPMreplicationSummary2.SRM__C = FALSE;  
            
           insert RDPMreplicationSummary2;
           
           list<GSD_RDPM_Replication_Detail__c> RDPMreplicationDetailList = new list<GSD_RDPM_Replication_Detail__c>();
           
           
           GSD_RDPM_Replication_Detail__c RDPMreplicationDetail = new GSD_RDPM_Replication_Detail__c();
           RDPMreplicationDetail .Action__c = 'Info';
           RDPMreplicationDetail .Status__c = 'Completed';
           RDPMreplicationDetail .GSD_Rdpm_Replication_Summary__c = RDPMreplicationSummary.Id;
           RDPMreplicationDetail .GSD_Resource_Skills_mapping__c = RDPMresourceSkillsMapping .Id;          
           RDPMreplicationDetail .Slave_System__c = gsdrmrFSM .Name;
           RDPMreplicationDetail .Slave_System_ID__c = gsdrmrFSM .Id;
           RDPMreplicationDetailList .add(RDPMreplicationDetail );       
           insert RDPMreplicationDetail;
           
           GSD_RDPM_Replication_Detail__c RDPMreplicationDetail1 = new GSD_RDPM_Replication_Detail__c();
           RDPMreplicationDetail1.Action__c = 'Info';
           RDPMreplicationDetail1.Status__c = 'Completed';
           RDPMreplicationDetail1.GSD_Rdpm_Replication_Summary__c = RDPMreplicationSummary1.Id;
           RDPMreplicationDetail1.GSD_Resource_Skills_mapping__c = RDPMresourceSkillsMapping .Id;          
           RDPMreplicationDetail1.Slave_System__c = gsdrmrFSM .Name;
           RDPMreplicationDetail1.Slave_System_ID__c = gsdrmrFSM .Id;             
           insert RDPMreplicationDetail1;
           
           GSD_RDPM_Replication_Detail__c RDPMreplicationDetail2 = new GSD_RDPM_Replication_Detail__c();
           RDPMreplicationDetail2.Action__c = 'Info';
           RDPMreplicationDetail2.Status__c = 'Completed';
           RDPMreplicationDetail2.GSD_Rdpm_Replication_Summary__c = RDPMreplicationSummary2.Id;
           RDPMreplicationDetail2.GSD_Resource_Skills_mapping__c = RDPMresourceSkillsMapping .Id;          
           RDPMreplicationDetail2.Slave_System__c = gsdrmrFSM .Name;
           RDPMreplicationDetail2.Slave_System_ID__c = gsdrmrFSM .Id;             
           insert RDPMreplicationDetail2;
           
           RDPMreplicationDetailList.add(RDPMreplicationDetail);
           RDPMreplicationDetailList.add(RDPMreplicationDetail1);
           RDPMreplicationDetailList.add(RDPMreplicationDetail2);
           
           insert RDPMreplicationDetailList;
           
           test.starttest();
           Database.QueryLocator QL;
           Database.BatchableContext BC;
           String GSDResourceQuery = 'SELECT GSD_Rdpm_Replication_Summary__r.GSD_Resource__r.SRM_Resource__c,GSD_Rdpm_Replication_Summary__r.GSD_Resource__r.FSM_Resource__c,GSD_Rdpm_Replication_Summary__r.GSD_Resource__r.Email__c,GSD_Rdpm_Replication_Summary__r.GSD_Resource__r.recordTypeID,GSD_Rdpm_Replication_Summary__r.GSD_Resource__r.PSA_Account_Name__c,GSD_Rdpm_Replication_Summary__r.GSD_Resource__r.PSA_Geo__c,GSD_Rdpm_Replication_Summary__r.GSD_Resource__r.PSA_Resource_Role__c,GSD_Rdpm_Replication_Summary__r.GSD_Resource__r.PSA_Practice__c,GSD_Rdpm_Replication_Summary__r.GSD_Resource__r.PSA_Work_Calendar__c,GSD_Rdpm_Replication_Summary__r.GSD_Resource__r.RMR_Primary_Operational_Role__c,GSD_Rdpm_Replication_Summary__r.GSD_Resource__r.CSC_Supports_Private_Cases__c,GSD_Rdpm_Replication_Summary__r.GSD_Resource__r.CSC_Origins_Supported__c,GSD_Rdpm_Replication_Summary__r.GSD_Resource__r.CSC_Support_Countries__c,GSD_Rdpm_Replication_Summary__r.GSD_Resource__r.Outage__c,GSD_Rdpm_Replication_Summary__r.GSD_Resource__r.CSC_Routing_Role__c,GSD_Rdpm_Replication_Summary__r.GSD_Resource__r.CSC_Service_Portfolio__c,GSD_Rdpm_Replication_Summary__r.GSD_Resource__r.CSC_Resource__c,GSD_Rdpm_Replication_Summary__r.GSD_Resource__r.First_Name__c,GSD_Rdpm_Replication_Summary__r.GSD_Resource__r.Last_Name__c,GSD_Rdpm_Replication_Summary__r.GSD_Resource__r.Lunch_Start_after_Calendar_Start_sec__c,GSD_Rdpm_Replication_Summary__r.GSD_Resource__r.Engineers_start_location_Country__c,GSD_Rdpm_Replication_Summary__r.GSD_Resource__r.Travel_Mode__c,GSD_Rdpm_Replication_Summary__r.GSD_Resource__r.Employee_ID__c,GSD_Rdpm_Replication_Summary__r.GSD_Resource__r.Travel_to_final_location_included__c,';
           
           GSDResourceQuery+= ' id,Action__c,GSD_Resource_Skills_mapping__c,Slave_System_ID__c ,GSD_Resource_Skills_mapping__r.Click_Service__c,GSD_Resource_User__c,GSD_RDPM_Replication_Summary__r.GSD_Resource__c,Object_Job_Name__c,Status__c,Slave_System__c'+
                    ' from GSD_RDPM_Replication_Detail__c where Status__c=\'Pending\' AND ( Object_Job_Name__c=\'GSD_Resource_Skills_mapping__c\' OR Object_Job_Name__c=\'GSD_Resource__c\')';
               
               GSDResourceSkillMappingBatch   SKMP = new GSDResourceSkillMappingBatch();
               /*SKMP.start(BC);
               SKMP.execute(BC,RDPMreplicationDetailList );
               SKMP.finish(BC);
               
              SKMP.Query =' id,Action__c,GSD_Resource_Skills_mapping__c,Slave_System_ID__c ,GSD_Resource_Skills_mapping__r.Click_Service__c,GSD_Resource_User__c,GSD_RDPM_Replication_Summary__r.GSD_Resource__c,Object_Job_Name__c,Status__c,Slave_System__c'+
   
                    ' from GSD_RDPM_Replication_Detail__c where Status__c=\'Pending\' AND ( Object_Job_Name__c=\'GSD_Resource_Skills_mapping__c\' OR Object_Job_Name__c=\'GSD_Resource__c\')';
       */    
           Database.executeBatch(SKMP );
           test.stoptest();
          }
    }

}

I have written a test class for batch,test methods are passing but it is not covering the code.