cucumber / cucumber-js

Cucumber for JavaScript
https://cucumber.io
MIT License
5.04k stars 1.09k forks source link

fix(junit): could not generate xml if error message has invalid character #2228

Closed zcmgyu closed 1 year ago

zcmgyu commented 1 year ago

πŸ€” What's changed?

Added invalidCharReplacement option in XML Builder in XML formatter

⚑️ What's your motivation?

I could not generate an XML report file via the JUnit formatter setting if the message of a failed test case contains any invalid character (Eg: \x08). So, in order to prevent these cases I added invalidCharReplacement option for XML builder as this documentation.

Screen Shot 2023-02-02 at 16 42 28

🏷️ What kind of change is this?

♻️ Anything particular you want feedback on?

Feel free to suggest any change or possible improvement.

πŸ“‹ Checklist:

coveralls commented 1 year ago

Coverage Status

Coverage: 98.563%. Remained the same when pulling 2a72c0de0f77a3f356f9ca2e83bb59c846c53c9b on zcmgyu:replace-invalid-char-in-junit-xml into 0a2d8dcb6afbe1cc50b45091d8294990952932fb on cucumber:main.

aslakhellesoy commented 1 year ago

Hi @zcmgyu,

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:

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

davidjgoss commented 1 year ago

Released in https://github.com/cucumber/cucumber-js/releases/tag/v8.11.0