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
Tanner RussellTanner Russell 

How to do testing coverage on time based events for process builder in apex

So I am stumped when it comes to getting passed timed events on a flow/process builder in a test class, I am able to invoke the process using a simple update/insert on the record but in the middle of the process there is a wait 1 hour.
What I have found so far is that I am able to query the FlowInterview based on the label but cannot/do not know how to forcefully start the FlowInterview through code. I have the interview wrapped in a test.starttest and test.stoptest so in theory if I can just force the execution the rest should just work.
If anyone here has experience writing test coverage for timed Flow/process builder events and can give me some tips it would be a huge help.
FlowInterview fI  = [select id, name,InterviewLabel,CurrentElement,Guid,PauseLabel,WasPausedFromScreen   from flowinterview where InterviewLabel = 'Change_Record_Type_to_RR_Escalation-15_InterviewLabel' limit 1]; 
//Somehow force the interview to continue		  //Flow.resumeFlow(fI);