[JUnit] Invoke (Before|After)Class and TestRules around Cucumber execution #1190
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Junit invokes several framework methods around the test execution.
The cucumber runner should finish its whole execution inside these.
To be precises these two should be equivalent:
By firing the TestRunFinished event and printing the summary directly
after invoking the children rather then after the completion of the
whole test run these are made equivalent again.
Firing the TestRunFinished event before the JUnit execution
is done might look a bit odd but semantically this is a cucumber event
not a junit event and cucumber has finished its execution at this point.
Context
https://cucumberbdd.slack.com/archives/C590XDQQH/p1501620355467970
Types of changes
Checklist:
I've manually placed breakpoints in the examples above to verify the methods are called in the correct order.