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

include stackTrace in result exception object #2371

Merged
merged 5 commits into from Jan 15, 2024

Conversation

davidjgoss
Copy link
Contributor

@davidjgoss davidjgoss commented Jan 12, 2024

πŸ€” What's changed?

Cucumber Messages now includes a stackTrace prop on the exception object in a test step result. This PR includes that field, which consist of just the captured and filtered stack trace, without the error message.

Also, previously we only tried to parse the stack trace if we needed to filter it - now we always try, because we ideally want to strip the message off the front to populate this new stack trace prop.

⚑️ What's your motivation?

Generally, this is more useful for formatter authors, allowing them to build up a richer representation of an error from messages.

Specifically, we have #2348 where we want this field for the JUnit formatter.

🏷️ What kind of change is this?

  • ⚑ New feature (non-breaking change which adds new behaviour)

πŸ“‹ 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.

@coveralls
Copy link

coveralls commented Jan 12, 2024

Coverage Status

coverage: 98.383%. remained the same
when pulling c542af5 on feat/exception-stack-trace
into 567a491 on main.

@davidjgoss davidjgoss marked this pull request as ready for review January 15, 2024 14:03
@davidjgoss davidjgoss merged commit 0f51ea7 into main Jan 15, 2024
8 checks passed
@davidjgoss davidjgoss deleted the feat/exception-stack-trace branch January 15, 2024 15:01
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.

None yet

2 participants