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

Fix missing execution steps statuses if same step is called multiple times in a test #24

Merged
merged 3 commits into from
Feb 15, 2024

Conversation

fahadi-henix
Copy link
Contributor

@fahadi-henix fahadi-henix commented Feb 2, 2024

🤔 What's changed?

The xml report formatter now returns the same number of step results as the number of steps in a cucumber test, even if some steps have the same name.
In code :
XmlReportData.getStepsAndResult() now returns a List<Map.Entry<String, String>> instead of a LinkedHashMap<String, String>
XmlReportWriter.createStepResultList() now take a List<Map.Entry<String, String>> instead of a LinkedHashMap<String, String> as parameter

⚡️ What's your motivation?

Fixes: #23

🏷️ What kind of change is this?

  • 🐛 Bug fix (non-breaking change which fixes a defect)

♻️ Anything particular you want feedback on?

📋 Checklist:

  • I agree to respect and uphold the Cucumber Community Code of Conduct
  • I've changed the behaviour of the code
    • I have added/updated tests to cover my changes.
  • My change requires a change to the documentation.
    • I have updated the documentation accordingly.
  • Users should know about my change
    • I have added an entry to the "Unreleased" section of the CHANGELOG, linking to this pull request.

This text was originally generated from a template, then edited by hand. You can modify the template here.

…d of LinkedHashMap<String, String>, to prevent crushing a step result with another step with same name result
CHANGELOG.md Outdated
@@ -6,6 +6,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
[0.2.1]: https://github.com/cucumber/cucumber-junit-xml-formatter/pull/24
Copy link
Contributor

Choose a reason for hiding this comment

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

Please remove the version number, and used the ### Fixed header. We use the format from https://keepachangelog.com.

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.

The implementation looks good!

But please clean up the issue name/pull request title, and put that in the changelog a long with a reference to the issue.

Typically a good issue name, and good change log entry follow the guidelines of a good commit title.

https://cbea.ms/git-commit/

Please also look at the existing entries and ensure consistency.

@fahadi-henix fahadi-henix changed the title getStepsAndResult now return a List<Map.Entry<String, String>> instea… Fix missing steps in xml report if same step called multiple times in a test Feb 5, 2024
@fahadi-henix fahadi-henix changed the title Fix missing steps in xml report if same step called multiple times in a test Fix missing execution steps statuses if same step is called multiple times in a test Feb 5, 2024
@fahadi-henix
Copy link
Contributor Author

@mpkorstanje Thanks for the review ! I Think I did the requested changes

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.

LGTM. Cheers!

I currently don't have Ethernet and USB tethering to my phone doesn't work. I'll release this asap.

@mpkorstanje mpkorstanje self-assigned this Feb 8, 2024
@mpkorstanje mpkorstanje merged commit 5e6da5d into cucumber:main Feb 15, 2024
3 checks passed
@aslakhellesoy
Copy link

Hi @fahadi-henix,

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

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.

Missing execution steps statuses if same step is called multiple times in a test
3 participants