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

[Core] Improve undefined step reporting #2208

Merged
merged 1 commit into from
Feb 13, 2021

Conversation

mpkorstanje
Copy link
Contributor

@mpkorstanje mpkorstanje commented Jan 17, 2021

The various ways to execute Cucumber report undefined steps inconsistently.
Partially because different tools have different reporting needs. Nevertheless:

When reporting per step or scenario the suggestion should include snippets for all
undefined steps in that scenario. This applies to:

  • JUnit4
  • TestNG
  • JUnit5
  • Teamcity Plugin

When reporting per test run the suggestion should include snippets for all
undefined steps in the execution. This applies to:

  • CLI

When printing snippets they should be copy-pasted into an IDE without further
editing. This means individual snippets or groups of snippets should not be
separated by spacers, text or anything else.

Fixes: #2024

@codecov
Copy link

codecov bot commented Jan 17, 2021

Codecov Report

Merging #2208 (558a17d) into main (e0ad566) will increase coverage by 0.14%.
The diff coverage is 77.31%.

Impacted file tree graph

@@             Coverage Diff              @@
##               main    #2208      +/-   ##
============================================
+ Coverage     82.79%   82.94%   +0.14%     
+ Complexity     2340     2334       -6     
============================================
  Files           306      306              
  Lines          8319     8312       -7     
  Branches        764      767       +3     
============================================
+ Hits           6888     6894       +6     
+ Misses         1120     1112       -8     
+ Partials        311      306       -5     
Impacted Files Coverage Δ Complexity Δ
.../cucumber/core/runtime/TestCaseResultObserver.java 45.23% <0.00%> (+11.41%) 4.00 <0.00> (ø)
.../cucumber/plugin/event/SnippetsSuggestedEvent.java 0.00% <0.00%> (ø) 0.00 <0.00> (ø)
.../src/main/java/io/cucumber/core/runner/Runner.java 97.80% <80.00%> (-1.03%) 29.00 <1.00> (+1.00) ⬇️
...n/java/io/cucumber/core/plugin/TeamCityPlugin.java 83.06% <81.48%> (+0.19%) 45.00 <5.00> (-1.00) ⬆️
...io/cucumber/core/plugin/DefaultSummaryPrinter.java 79.06% <100.00%> (ø) 11.00 <1.00> (ø)
.../junit/platform/engine/UndefinedStepException.java 100.00% <100.00%> (+21.42%) 5.00 <4.00> (-1.00) ⬆️
...src/main/java/io/cucumber/junit/JUnitReporter.java 90.90% <100.00%> (-4.82%) 22.00 <2.00> (ø)
...java/io/cucumber/junit/UndefinedStepException.java 100.00% <100.00%> (+6.06%) 5.00 <5.00> (-4.00) ⬆️
...ava/io/cucumber/testng/UndefinedStepException.java 100.00% <100.00%> (+20.00%) 6.00 <4.00> (-1.00) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e0ad566...558a17d. Read the comment docs.

@mpkorstanje mpkorstanje added this to the v7.0.0 milestone Jan 17, 2021
@mpkorstanje mpkorstanje force-pushed the improve-undefined-step-reporting branch 2 times, most recently from 338f21a to 715181a Compare January 23, 2021 18:58
@mpkorstanje mpkorstanje modified the milestones: v7.0.0, v6.x.x Feb 12, 2021
@mpkorstanje mpkorstanje force-pushed the improve-undefined-step-reporting branch 3 times, most recently from e994ef4 to fd024de Compare February 13, 2021 21:25
@mpkorstanje mpkorstanje marked this pull request as ready for review February 13, 2021 21:25
@mpkorstanje mpkorstanje force-pushed the improve-undefined-step-reporting branch from fd024de to 89b2ad6 Compare February 13, 2021 21:45
The various ways to execute Cucumber report undefined steps inconsistently.
Partially because different tools have different reporting needs. Nevertheless:

When reporting per scenario the suggestion should include snippets for all
undefined steps in that scenario. This applies to:
 - JUnit4
 - TestNG
 - JUnit5
 - Teamcity Plugin

When reporting per test run the suggestion should include snippets for all
undefined steps in the execution. This applies to:
 - CLI

When printing snippets they should be copy-pasted into an IDE without further
editing. This means individual snippets or groups of snippets should not be
separated by spacers, text or anything else.

Fixes: #2024
@mpkorstanje mpkorstanje force-pushed the improve-undefined-step-reporting branch from 89b2ad6 to 558a17d Compare February 13, 2021 21:48
@mpkorstanje mpkorstanje merged commit c4f81bb into main Feb 13, 2021
@mpkorstanje mpkorstanje deleted the improve-undefined-step-reporting branch February 13, 2021 22:01
This was referenced Mar 15, 2021
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.

Generating step definitions with Cucumber 6 vs Cucumber 5
1 participant