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
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
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
Merge branch 'global-hooks-before-after-all' of https://github.com/andryutz10/cucumber-jvm into andryutz10-global-hooks-before-after-all
Attribution. Closes #515, #678
Merge branch 'andryutz10-global-hooks-before-after-all'