Skip to content

Test framework

Alan B. Christie edited this page Aug 15, 2025 · 9 revisions

The engine is "Event Driven", so to test it we simply have to send events (Protocol Buffer messages) to its handle_message() method. This sounds simple enough but, as a key element of the engine is the manipulation of database records, and the asynchronous launch of Job, the engine need to run in as multiple processes connected by a "mock" message bus. The engine relies on the behaviour of an InstanceLauncher and Workflow API Adapter in order to progress through the numerous stats a running workflow experiences. All of this leads to a test framework that is a challenging environment to construct, resulting in a significant amount of code to be developed before even the simplest of tests can be executed. A brief tour of the test framework follows.

See also

  1. The "Unit testing the WorkflowEngine" section of the Shortcut doc Workflow engine design
Clone this wiki locally