Hello,
We have complex workflows representing business processes that behave differently based on the initial input as well as data received from external systems during their lifecycle. Additionally, timing is crucial for our application.
It is essential for us to thoroughly test these processes, not only through unit and integration testing but also using end-to-end (E2E) tests. We are currently using the Robot Framework for our E2E testing.
However, since Temporal currently supports time skipping only in the test environment, we are facing challenges when E2E testing workflows that depend on time-based decisions. For example, we have a workflow that waits for a signal for 14 days. If the signal is not received within this period, the control flow changes, triggering a different behavior instead of the initially planned one.
To test this change in behaviour we would need to a E2E test that runs several weeks. To address this issue, we are considering introducing “testing” environment variables in our production code to modify the control flow and timing during E2E tests. However, we find this approach inelegant and undesirable as it adds unnecessary complexity to our codebase.
Therefore, we wanted to ask:
- Are there any best practices or recommendations for handling time skipping in E2E tests?
- Are there any plans to support time skipping in the Temporal server/environment implementations in the future?
We would greatly appreciate any guidance or insights on this topic.
All the best and thanks for your great work!