Is it possible to simulate a timer event?

Is it possible to simulate a timer event for testing flow nodes after the timer node?

The Camunda Cloud team use Camunda Cloud to run Camunda Cloud, and in a demo they gave last week, I saw a BPMN diagram with conditional gateways in front of timers with “test==true” as the condition. So they route around the timers for end-to-end process testing.

Hi @neki,

in which scope do you want to test the workflow?
In which environment do you run your tests?

In the Zeebe unit and integrations tests, we can manipulate the time to trigger timer events.

2 Likes

We use zeebe-test to write JUnit tests.
Managing time is a very good idea for CI server.
But I do not want to change the system time on the developer’s computer, which can run tests.
I just want to check all flow nodes after a timer in a simple JUnit test

I think they manipulate the representation of time programmatically in the broker…

1 Like

Correct. Instead of manipulating the system time, we have an abstraction that can be controlled for tests.

However, the clock util is currently not exposed in the zeebe-test module. I see that it is also useful for writing user tests. Feel free to open an issue :slight_smile:

Thank you! I opened issue https://github.com/zeebe-io/zeebe/issues/3751

1 Like