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

[JUnit/TestNG] Always print snippets and summary #1790

Merged
merged 1 commit into from
Oct 7, 2019

Conversation

mpkorstanje
Copy link
Contributor

@mpkorstanje mpkorstanje commented Oct 5, 2019

Summary

Cucumber can be ran through the CLI, JUnit and TestNG. The latter two can also be run through Maven, Gradle, IDEA and Eclipse. Each of these runners has different ways and needs to output information. To be a good CLI citizen Cucumber should integrate with these runners to ensure only the necessary information is printed.

This is achieved by using the hooks provided by each frameworks to log undefined steps. This information is then always logged to formatted xml files in the XUnit format. However when not running in strict mode (i.e. the test is skipped) Surefire and Gradle will not print or log this information.

This makes Cucumber harder to use. By always enabling the summary printer we can avoid this.

How Has This Been Tested?

Manually checked combinations of JUnit, TestNG, IDEA, Eclipse, Maven and Gradle. The output is less then ideal because the missing steps are also included in the step definition but after #1788 is done we can remove them from the summary printer (except for CLI).

Types of changes

  • Bug fix (non-breaking change which fixes an issue).
  • New feature (non-breaking change which adds functionality).
  • Breaking change (fix or feature that would cause existing functionality to not work as expected).

@mpkorstanje mpkorstanje added this to the 5.0.0 milestone Oct 5, 2019
@mpkorstanje mpkorstanje mentioned this pull request Oct 5, 2019
4 tasks
@coveralls
Copy link

coveralls commented Oct 5, 2019

Coverage Status

Coverage decreased (-0.3%) to 86.95% when pulling 2666c6b on print-undefined-steps-as-needed into e353575 on master.

@mpkorstanje mpkorstanje force-pushed the print-undefined-steps-as-needed branch from 1b5db2b to 2666c6b Compare October 5, 2019 16:44
@mpkorstanje mpkorstanje force-pushed the print-undefined-steps-as-needed branch from 2666c6b to 7d50f9f Compare October 7, 2019 14:19
@mpkorstanje mpkorstanje mentioned this pull request Oct 7, 2019
4 tasks
@mpkorstanje mpkorstanje changed the title [JUnit/TestNG] Print snippets for undefined steps as needed [JUnit/TestNG] Always print snippets and summary Oct 7, 2019
@mpkorstanje mpkorstanje merged commit 7a0481b into master Oct 7, 2019
@mpkorstanje mpkorstanje deleted the print-undefined-steps-as-needed branch November 25, 2019 21:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants