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 error message when plugin paths collide #2168

Merged
merged 1 commit into from
Oct 31, 2020
Merged

Conversation

mpkorstanje
Copy link
Contributor

Cucumber v6 introduced a new html formatter. This formatter writes to a file
rather then a directory[1]. However a typical use to ensure all files and up
in a single folder would be plugin=json:target/cucumber/report.json, html:target/cucumber.

So depending on the order this results in Cucumber being unable to either
create the target/cucumber as file for the html report or target/cucumber
as a directory for the json report.

The improved error message should point this out.

Fixes: #2108

Additionally the PluginFactory tests were rewritten to make them follow the
arrange-act-test pattern.

  1. https://github.com/cucumber/cucumber-jvm/blob/main/release-notes/v6.0.0.md#improved-html-formatter

Cucumber v6 introduced a new html formatter. This formatter writes to a file
rather then a directory[1]. However a typical use to ensure all files and up
in a single folder would be `plugin=json:target/cucumber/report.json, html:target/cucumber`.

So depending on the order this results in Cucumber being unable to either
create the `target/cucumber` as file for the html report or `target/cucumber`
as a directory for the json report.

The improved error message should point this out.

Fixes: #2108

Additionally the PluginFactory tests were rewritten to make them follow the
arrange-act-test pattern.

1. https://github.com/cucumber/cucumber-jvm/blob/main/release-notes/v6.0.0.md#improved-html-formatter
@codecov
Copy link

codecov bot commented Oct 31, 2020

Codecov Report

Merging #2168 into main will increase coverage by 0.02%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##               main    #2168      +/-   ##
============================================
+ Coverage     82.78%   82.80%   +0.02%     
  Complexity     2313     2313              
============================================
  Files           306      306              
  Lines          8293     8294       +1     
  Branches        767      767              
============================================
+ Hits           6865     6868       +3     
+ Misses         1119     1117       -2     
  Partials        309      309              
Impacted Files Coverage Δ Complexity Δ
...in/java/io/cucumber/core/plugin/PluginFactory.java 74.46% <100.00%> (+2.42%) 25.00 <0.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 f8e1eb2...ec0634e. Read the comment docs.

@mpkorstanje mpkorstanje merged commit 93501eb into main Oct 31, 2020
@mpkorstanje mpkorstanje deleted the 2108 branch October 31, 2020 14:04
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.

Confusing/misleading error creating FileOutputStream for plugin
1 participant