To aid testing, make it possible to inject a glue when creating a
Runtime. Also add a test specify that a CucumberException is thrown
if no backends are found (or an emtpy collection of backends is
The main issue is that the JUnitFormatter does not handle failures
in the before and after hooks properly. To add flexibility the tests
also specify that the JUnitFormatter should handle both all-steps-first
execution and one-step-at-the-time execution.
To fix the missmatch between the PrettyFormatter from the Gherkin
library and Cucumber-JVM, by reverting the scenario execution to
all-steps-first execution as in Cucumber-JVM 1.1.2. This is possible
since the JSONFormatter in the Gherkin library in Gherkin 2.12.0
supports all-steps-first execution.