Skip to content

Rework handling of non-pass results#426

Draft
davidjgoss wants to merge 7 commits intomainfrom
exceptions-on-failed-only
Draft

Rework handling of non-pass results#426
davidjgoss wants to merge 7 commits intomainfrom
exceptions-on-failed-only

Conversation

@davidjgoss
Copy link
Contributor

@davidjgoss davidjgoss commented Feb 4, 2026

🤔 What's changed?

This PR reworks our handling of non-passing scenarios, in particular the different statuses of responsible step. Previously, we generically showed any exception or message that was present on a result, regardless of the status. Here, we've spun out separate rendering paths for each status:

Status Behaviour
SKIPPED   TBA
PENDING   TBA
UNDEFINED   Short note, and snippets
AMBIGUOUS   Short note, and list of matched step definitions
FAILED   Show exception or message if present

⚡️ What's your motivation?

🏷️ What kind of change is this?

  • 🐛 Bug fix (non-breaking change which fixes a defect)
  • ⚡ New feature (non-breaking change which adds new behaviour)
  • 💥 Breaking change (incompatible changes to the API)

📋 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.

@netlify
Copy link

netlify bot commented Feb 4, 2026

Deploy Preview for cucumber-react-preview ready!

Name Link
🔨 Latest commit e9170d8
🔍 Latest deploy log https://app.netlify.com/projects/cucumber-react-preview/deploys/6984d706e989120008451d69
😎 Deploy Preview https://deploy-preview-426--cucumber-react-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@davidjgoss
Copy link
Contributor Author

So far:

image

@davidjgoss
Copy link
Contributor Author

davidjgoss commented Feb 4, 2026

@mpkorstanje @clrudolphi @luke-hill picking up from #421, what presentation do we want for skipped and pending steps where there is something in TestStepResult.exception or TestStepResult.message - I'm aware that in some (but not all) implementations those statuses are triggered by an exception, but I'm not sure if it encodes any useful information. If so, perhaps it should be presented more subtly than the FAILED one, and without the stack trace?

@mpkorstanje mpkorstanje self-requested a review February 4, 2026 01:34
@luke-hill
Copy link
Contributor

luke-hill commented Feb 4, 2026

Added a comment on the related issue, as I noticed something diff in cucumber-ruby recently. Not sure if it helps or not.

My 0.02c was in there. TL;DR - Old skipped logic where everything was greyed out (Scenario/steps), is preferred imo for skipped/bypassed scenarios. The reason being is there should be a reason they're skipped, and the user can investigate

@davidjgoss
Copy link
Contributor Author

@luke-hill can you raise a separate issue for that and we can discuss there? This is specifically about handling output at the step level.

@clrudolphi
Copy link

@mpkorstanje @clrudolphi @luke-hill picking up from #421, what presentation do we want for skipped and pending steps where there is something in TestStepResult.exception or TestStepResult.message - I'm aware that in some (but not all) implementations those statuses are triggered by an exception, but I'm not sure if it encodes any useful information. If so, perhaps it should be presented more subtly than the FAILED one, and without the stack trace?

Yes, in Reqnroll, the skip and pending behaviors are triggered by exceptions. It does provide a mechanism for a message to accompany the exception. So, I would like to see the message included. The exception stack trace is of no interest.

@mpkorstanje
Copy link
Contributor

@mpkorstanje @clrudolphi @luke-hill picking up from #421, what presentation do we want for skipped and pending steps where there is something in TestStepResult.exception or TestStepResult.message - I'm aware that in some (but not all) implementations those statuses are triggered by an exception, but I'm not sure if it encodes any useful information. If so, perhaps it should be presented more subtly than the FAILED one, and without the stack trace?

For Cucumber JVM it encodes useful information. I.e. the reason why the test was skipped and in the stacktrace where the skip came from. But I think users can life without the stacktrace.

@mpkorstanje mpkorstanje removed their request for review February 5, 2026 14:29
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.

Rendering differences of Skipped Scenarios in v24

4 participants