Story execution often requires stories to time out after a given duration. The story timeouts are configurable via the EmbedderControls, or equivalently via @UsingEmbedder or the Ant tasks or Maven goals.
JBehave supports multiple timeout formats:
The format parsing will be attempted in the given order. If no valid format is found, the parsing will fail with a runtime TimeoutFormatException.
User-provided parsers will take precedence over the default parsers.
Timeouts can be configured to be applicable only for a specific groups of path patterns. The story timeouts property is a comma-separated list of colon-separated pattern-timeout pairs:
The path pattern is optional and if not specified it is assumed to be a default timeout used when other paths are not matched. The first such default timeout found in the list will be used.
The path patterns can be either Ant-style or regular expression patterns. Valid examples of story timeouts include:
2m 30s 2m 30s,**/*short*:50s,**/*long*:5m **/.*short.*:50,**/*long*:300 /[a-z]+/.*short.*:50s,/[a-z]+/.*long.*:5m /[a-z]+/.*short.*:50s,**/*long*:5m