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] Read rerun files from directories #2710

Merged
merged 16 commits into from
Apr 13, 2023
Merged

Conversation

dbfwhitney
Copy link
Contributor

Added a method to try and add functionality to process all rerun folders in a directory (if more than 0 files exist). Still needs work as not sure how to implement walkFileTree method.

@dbfwhitney dbfwhitney marked this pull request as draft March 20, 2023 20:46
Copy link
Contributor

@mpkorstanje mpkorstanje left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Now there are a few more things that need to be done before this can be merged.

  1. Write some tests.
  2. Clean up the code
  3. Update the CHANGELOG.md

Once that is done the feature can be released.

Writing tests

The test for this class would go into the CucumberPropertiesParserTest. There already is a test for should_parse_rerun_file so you can use that to pattern a few more tests. I reckon the important cases are a directory with no files and a directory with two files.

These tests will make the next part easier.

Cleaning up the code

I've left some comments on the code itself. They'll make the code a bit better.

Update the CHANGELOG

In the CHANGELOG.md file you can add a ### Fixed header and add an entry for your change. Have a look at the older entries to see the format used.

@mpkorstanje
Copy link
Contributor

Pushed some changes. Still have to update the docs on @CucumberOptions, USAGE.txt, Constants.java, ect.

@codecov
Copy link

codecov bot commented Apr 5, 2023

Codecov Report

Merging #2710 (a892b61) into main (97137e6) will increase coverage by 0.01%.
The diff coverage is 80.00%.

@@             Coverage Diff              @@
##               main    #2710      +/-   ##
============================================
+ Coverage     84.99%   85.01%   +0.01%     
- Complexity     2724     2726       +2     
============================================
  Files           330      331       +1     
  Lines          9555     9561       +6     
  Branches        915      914       -1     
============================================
+ Hits           8121     8128       +7     
+ Misses         1111     1110       -1     
  Partials        323      323              
Impacted Files Coverage Δ
...ava/io/cucumber/core/feature/FeatureWithLines.java 71.42% <ø> (+2.38%) ⬆️
.../core/options/CucumberOptionsAnnotationParser.java 87.91% <0.00%> (+2.80%) ⬆️
...c/main/java/io/cucumber/junit/CucumberOptions.java 100.00% <ø> (ø)
.../main/java/io/cucumber/testng/CucumberOptions.java 100.00% <ø> (ø)
.../main/java/io/cucumber/core/options/RerunPath.java 76.00% <76.00%> (ø)
...ucumber/core/options/CommandlineOptionsParser.java 81.50% <100.00%> (-0.32%) ⬇️
...ucumber/core/options/CucumberPropertiesParser.java 96.87% <100.00%> (+0.77%) ⬆️
...mber/core/options/FeatureWithLinesOrRerunPath.java 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@mpkorstanje mpkorstanje marked this pull request as ready for review April 13, 2023 12:29
@mpkorstanje mpkorstanje changed the title Allow multiple rerun files functionality [Core] Read rerun files from directories Apr 13, 2023
@mpkorstanje mpkorstanje merged commit 654cafc into cucumber:main Apr 13, 2023
@aslakhellesoy
Copy link
Contributor

Hi @dbfwhitney,

Thanks for your making your first contribution to Cucumber, and welcome to the Cucumber committers team! You can now push directly to this repo and all other repos under the cucumber organization! 🍾

In return for this generous offer we hope you will:

  • ✅ Continue to use branches and pull requests. When someone on the core team approves a pull request (yours or someone else's), you're welcome to merge it yourself.
  • 💚 Commit to setting a good example by following and upholding our code of conduct in your interactions with other collaborators and users.
  • 💬 Join the community Slack channel to meet the rest of the team and make yourself at home.
  • ℹ️ Don't feel obliged to help, just do what you can if you have the time and the energy.
  • 🙋 Ask if you need anything. We're looking for feedback about how to make the project more welcoming, so please tell us!

On behalf of the Cucumber core team,
Aslak Hellesøy
Creator of Cucumber

@mpkorstanje
Copy link
Contributor

@dbfwhitney thanks for the first setup.

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.

3 participants