Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct JUnit notification for background steps #660

Merged

Conversation

brasmusson
Copy link
Contributor

The background steps are copied in the ExecutionUnitRunner for each scenario in a feature with background. This is done to make them unique for each scenario, so that the JUnit notification later will not be ambiguous. When the background steps are executed, it is the original ones that are executed. If the background steps are not 'converted' from the original steps to the copies made earlier, when performing the actual JUnit notifications for an execution unit (scenario), then the background step appear as Unrooted test in the Eclipse JUnit tab:
cucumber-junit-error

This PR change the JUnitReporter to use the steps copied, and now stored, in the ExecutionUnitRunner, as base for the JUnit notification. Then the background steps appear correctly in the Eclipse JUnit tab:
cucumber-junit-error-fixed

Fixes: #659.

The background steps are copied in the ExecutionUnitRunner for each
scenario in a feature with background. This is done to make them unique
for each scenario, so that the JUnit notification later will not be
ambiguous. When the background steps are executed, it is the original
ones that are executed. Therefore the background steps need to be
'converted' from the original steps to the copies made earlier, when
performing the actual JUnit notifications for an execution unit
(scenario).
@aslakhellesoy aslakhellesoy merged commit 2775bc1 into cucumber:master Jun 26, 2014
aslakhellesoy added a commit that referenced this pull request Jun 26, 2014
@brasmusson brasmusson deleted the junit-notify-on-background-steps branch June 28, 2014 08:31
@lock
Copy link

lock bot commented Oct 25, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Oct 25, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

IDEA test results tree is incorrect
2 participants