@isTest public class ProRegisterBatchTest { static testMethod void Test01(){ Product_Register__c PRC = new Product_Register__c(); PRC.Name = '国械注进20183222249'; PRC.MedPrdClass__c = '3'; PRC.RegisterNoClass_New__c = ''; PRC.RegisterNoClass_Old__c = '6822'; PRC.PrdCompanyAddr__c = '名称:奥林巴斯医疗株式会社;住所:日本国东京都涩谷区幡之谷二丁目43番地2号;联系方式:0081-426-42-2667'; PRC.RegisterNoStatus__c = '有效'; PRC.ValidTo__c = Date.today(); insert PRC; Id execBTId = Database.executeBatch(new ProRegisterBatch(), 100); execBTId = Database.executeBatch(new ProRegisterBatch(PRC.Id), 100); } }