question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Given, When, Then keywords explicitly mapped

See original GitHub issue

Given, When, Then keywords are explicitly mapped, the basic cucumber rules are not getting followed. i.e we are allowed to create duplicate step with a different keyword. For instance given(user navigates to {string}) is valid as well as then(user navigates to {string}) is also valid. I believe the vice versa should be the case, wherein cucumber should allow the use of any keyword to define in the feature file but only one declaration of the step.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
imageicacommented, Mar 13, 2018

@lgandecki yes that is exactly what i am saying. cucumber wiki states that, “Every scenario consists of a list of steps, which must start with one of the keywords Given, When, Then, But or And. Cucumber treats them all the same, but you shouldn’t.” The reason cucumber treats them all same is to restrict step duplication and I think we should too.

0reactions
lgandeckicommented, Apr 3, 2018

This is fixed in 0.4.0 , please give it a try, and if still doesn’t work as needed please create a new issue. Thanks for reporting!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Rules + Examples · Issue #250 · cucumber/common - GitHub
Summary There is no useful mapping between Gherkin and "rules and examples". Expected Behavior I can express Rules and Examples naturally ...
Read more >
BDD 101: Writing Good Gherkin - Automation Panda
Writing good feature files is harder that you think. Follow these tried-and-true best practices to write Gherkin like a pro.
Read more >
Keyword mapping: What Is It And How To Do It In 2022
Keyword mapping is the process of assigning keywords – discovered during your keyword research – to specific pages on a website based on...
Read more >
Gherkin Rules, tags, and Example Mapping | Cucumber Blog
Given/When/Then are the core keywords of Gherkin; Gherkin is the structured syntax understood by automation tools such as Cucumber; Cucumber is ...
Read more >
3 What is Cucumber Feature File - YouTube
HelloIn this tutorial, I will explain you complete overview of the feature file and detailed information on Gherkin Keywords.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found