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

JUnitFormatter: use ascending numbering of outline scenarios #706

Merged

Conversation

brasmusson
Copy link
Contributor

Currently the JUnitFormatter use descending numbering in the names of the instantiated scenarios from scenario outlines, which seems a little unnatural. That is (the name attribute of the testcase xml element):

name="outline name_2"
name="outline name_1"

Because the JUnitFormatter relies on calls to the examples method to determine the number of instantiated scenarios, the numbering is not applied at all when using the JUnit runner, then all testcase element instantiated from the scenario outline will have the value in the name attribute.

Change theJUnitFormatter to use ascending numbering, and make it work also with the JUnit runner. Basically:

name="outline name"
name="outline name 2\"

Also take into account that the scenario name may contain outline argument which are replaced with values from the examples tables. That means only apply numbering of the consecutive instantiated scenario names are the same.

Currently the JUnitFormatter use descending numbering in the names of
the instantiated scenarios from scenario outlines, which seems a little
unnatural. Because the JUnitFormatter relies on calls to the examples
method to determine the number of instantiated scenarios, the numbering
is not applied at all when using the JUnit runner. Change the
JUnitFormatter to use ascending numbering, and make it work also with
the JUnit runner.
@aslakhellesoy aslakhellesoy merged commit ae1c079 into cucumber:master Jun 26, 2014
aslakhellesoy added a commit that referenced this pull request Jun 26, 2014
@brasmusson brasmusson deleted the junit-formatter-outline-fix branch June 28, 2014 08:33
@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.

2 participants