Skip to content

Conversation

@atdd-bdd
Copy link

Added examples of scenarios that are between imperative and declarative.
As Jerry Weinberg says, "There are at least three solutions to every problem"

🤔 What's changed?

⚡️ What's your motivation?

🏷️ What kind of change is this?

  • 📖 Documentation (improvements without changing code)
  • 🏦 Refactoring/debt/DX (improvement to code design, tooling, etc. without changing behaviour)
  • 🐛 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)

♻️ 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.

Added examples of scenarios that are between imperative and declarative
@netlify
Copy link

netlify bot commented Nov 10, 2025

Deploy Preview for cucumber-website-preview ready!

Name Link
🔨 Latest commit da2aa3f
🔍 Latest deploy log https://app.netlify.com/projects/cucumber-website-preview/deploys/69124e1b0e361f00082db27e
😎 Deploy Preview https://deploy-preview-170--cucumber-website-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.

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.

Hey Ken, thanks for writing this. But the "why" isn't immediately obvious to me. Why would we recommend an in-between style? And how does this help users make their Gherkin better?


## In-Between Imperative and Declarative

There is a style between these two. It demonstrates the logical flow, without the details of the user interface. The data can be used to automate the test the core implementation, as well as used to either manually or automatically test the user interface.
Copy link
Contributor

Choose a reason for hiding this comment

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

Unclear reference. What are "these two"? Something in between "Describing behavior" and "Consider a more declarative style" (the page headings). Or something in between declarative and imperative?

If the latter then this should be under a h3, not a h2.

Copy link
Contributor

Choose a reason for hiding this comment

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

I also hope that we don't recommend manual non-exploratory testing 😉 .

Copy link
Author

Choose a reason for hiding this comment

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

Thanks for the comments. The name was not as descriptive and the reasoning was short. What about something that looked like this.
gherkin better - addition.md

Copy link
Author

Choose a reason for hiding this comment

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

I'm not suggesting manual non-exploratory testing. The data could be used as the starting point for exploratory testing.

In some cases, automating UI tests is deferred to later in the development process. The data could be used as for a manual test of the UI in the interim.

Scenario: Free subscribers see only the free articles
Given user is logged in
| User Name | Password | Subscription |
| [email protected] | validPassword123 | Free |
Copy link
Contributor

Choose a reason for hiding this comment

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

These are incidental details. Ideally they're kept out of the Gherkin. I wouldn't recommend this to any one.

Copy link
Author

Choose a reason for hiding this comment

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

My original scenario was bad. I just copied the data from the first one. Too fast and not enough thought.

There should be a separate scenarios for logging on showing responses for user input variations

@mpkorstanje mpkorstanje self-requested a review November 11, 2025 19:13
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.

2 participants