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

Inconsistent TestStepResult for pending steps across implementations #88

Closed
davidjgoss opened this issue Nov 3, 2023 · 6 comments
Closed

Comments

@davidjgoss
Copy link
Contributor

davidjgoss commented Nov 3, 2023

(Not an issue with CCK as such but have to raise it somewhere.)

Recent work on CCK has highlighted differences in how various Cucumber implementations output a TestStepResult message for a step that was marked pending by the user.

It's worth noting that the mechanism for marking a step pending also varies between implementations - Ruby and JVM do it by throwing, whereas JS and fake-cucumber return from the step function. This influences the current behaviour a little, I think.

Here's the current state of things (with status and timing fields omitted as these are all fine):

field reference cucumber-ruby cucumber-jvm cucumber-js
message (omitted) Name of pending exception Stack trace from pending exception (omitted)
exception (omitted) Pending exception Pending exception (omitted)
@luke-hill
Copy link
Contributor

Not sure if we want to comment here or in messages but the user supplied reason for both pending/skipped in cucumber ruby gets lost in the ether, it's not fully implemented to go through all the steps to message building

There is a message prop but it's kind of redundant

@davidjgoss
Copy link
Contributor Author

@luke-hill what gets populated on the message prop then for the CCK to be failing on it?

@luke-hill
Copy link
Contributor

There is a prop. Which is why it fails. The CCK has no message prop. So the failing test states "Too many keys produced"

@davidjgoss
Copy link
Contributor Author

Ah so a prop with no value?

@luke-hill
Copy link
Contributor

luke-hill commented Nov 3, 2023

It says something like message: " ()Cucumber::Pending" but the devkit generates no message (If you check the ndjsons they're all just featuring status and time)

@davidjgoss
Copy link
Contributor Author

davidjgoss commented Nov 9, 2023

This was discussed at the community call today. Upshot:

  • message should appear on result messages for pending steps - no hard requirements on the content, but it may be a user-authored string explaining why the step isn't implemented yet, or just a default value from Cucumber (suggestion: TODO).
  • exception should not appear for pending steps - an exception may have been thrown but only as a vehicle to mark the step pending, and this should not be exposed to reporting.

So the work needed now is:

  1. Change fake-cucumber to include a message value for pending steps . Release.
  2. Regenerate the reference messages in compatibility-kit. Release.
  3. Make any required changes to cucumber-(js|jvm|ruby). Release.

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

No branches or pull requests

2 participants