cucumber/cucumber-jvm — pull request #678 by andryutz10 (2014-03-04 21:29:05+00:00)
Title: Global hooks before after all

Add new hooks for global level (@BeforeAll and @AfterAll) that run only once before all and after all existing features/scenarios. Unit test and cucumber test to cover the new hooks and the running order between hooks.
An execution flow with the new hooks looks like this:
1 - @BeforeAll hook(s) (runs before all features once)
2 - @Before hook(s) (no change, same behavior - before every scenario or tagged scenarios)
3 - @After hook(s) (no change, same behavior - after every scenario or tagged scenarios)
4 - .... 2 and 3 for all scenarios in a feature
5 - @AfterAll hook(s) (runs once after all the features are run)
As test for the new hooks see/run:
cucumber.runtime.java.hooks.RunWithAllHooksTest
cucumber.runtime.java.hooks.HooksStepDefs
test\resources\cucumber\runtime\java\hooks\feature-1.feature
test\resources\cucumber\runtime\java\hooks\feature-2.feature
Added junit tests and cucumber tests for new code