You need to sign in to do that
Don't have an account?
VSK98
How to write a Test class for a schedule class calling from button
Hi,
I am struck for writing test class for below requirement.........Actaually i am schedule class from custom button
Here is my code
So far i covered 0 percent .............Pls help me out.........
Adv Thnx
Siv
I am struck for writing test class for below requirement.........Actaually i am schedule class from custom button
Here is my code
global class class_name{ WebService static String Method_name() { Datetime currentTime = datetime.now(); Datetime newTime = currentTime.addSeconds(20); // build cron expression String sch= String.valueOf(newtime.second()) +' ' + String.valueOf(newtime.minute()) + ' ' + String.valueOf(newTime.hour()) + ' ' + String.valueOf(newTime.day()) + ' ' + String.valueOf(newTime.month()) + ' ? ' + String.valueOf(newTime.year()); ScheduleClass_Name scheduleObject = new ScheduleClass_Name(); Id sId = system.schedule('schdclass'+newtime , sch, scheduleObject ); return sId ; } }
So far i covered 0 percent .............Pls help me out.........
Adv Thnx
Siv
can you please share the test class you have written so far to cover these lines ?
I got it.................100% percentage covered......