[JUnit/TestNG] Always print snippets and summary #1790
Merged
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.
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