Multi-Threading

The JBehave Embedder allows concurrent execution of stories. The multi-threading behaviour is controlled by setting the number of concurrent threads (which defaults to 1) via the EmbedderControls, or equivalently via the Ant or Maven access points.

It is important to note that it's the entire story that is executed in one concurrent execution and that scenarios within the same story cannot be run concurrently.

Enqueing a single story

The Embedder API allow the enqueuing of a single story via the enqueueStory method. This is used for example by the WebQueue to provide a simple web facade to running stories in an asynchronous way.

Examples

Examples of use of multi-threading can be found in the JBehave Trader Example and the JBehave Tutorial (EtsyDotComStories).