You need to sign in to do that
Don't have an account?
Liron Cohen
time based workflow in test class
Hi.
I couldn't find any documentation for this, so appreciate your assitenace.
Assume I have time based workflow which scheduled for future (assume 7 days after the event), and then it update the record.
If it will be scheduled from test class, does the workflow update action will be process during the test? Is this functionality was changed in any of the latest realese?
I can see it does running (according to debug log), but see also old questions people asking how they can test time based workflow.
Thanks
I couldn't find any documentation for this, so appreciate your assitenace.
Assume I have time based workflow which scheduled for future (assume 7 days after the event), and then it update the record.
If it will be scheduled from test class, does the workflow update action will be process during the test? Is this functionality was changed in any of the latest realese?
I can see it does running (according to debug log), but see also old questions people asking how they can test time based workflow.
Thanks
Yes,you are right it doesn't run,whenever you want to run the unit tests it is meant for code,as time-based workflow is related to configuration part it doesn't run in unit testing.
Please find the below which can successfully run in unit testing.
- Batch Apex
- Schedule Apex
- Queueable apex
- Future Methods etc.
Please mark this as solved if the information helps so that it gets removed from the unanswered queue which results in helping others who are really in need of it.Best Regards,
Nagendra.P