You need to sign in to do that
Don't have an account?
Saru Vadlamudi
How to test Time dependent workflow
i have the scenario that workflow has to trigger before 180 days of end date.
When i testing with providing all the criteria satisfied even then email in not triggering.
Please suggest me how to test it.
When i testing with providing all the criteria satisfied even then email in not triggering.
Please suggest me how to test it.
There is a way to test time based workflow. Trigger the workflow, then go to Setup|Monitoring|Time Based Workflow and see that the action has been queued (you can also see what time it's queued for). If anything happens between when you triggered the action and when it's actually supposed to happen that violates the workflow criteria then the action(s) will be unqueued.
Hope this helps
--
Regards,
Swayam
@Salesforceguy
Have you tried it in a Test Class? Need to confirm if the Future event will be fired successfully.
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.
Hope this helps
--
Regards,
Swayam
@Salesforceguy
My intention is to test scenarios in the application. I will assert on the Count of flowInterview object for the time being.
Cheers!