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.

Is the "Rule" keyword supported?

See original GitHub issue

In the Gherkin v6 spec, the Rule keyword was added.

When I add this keyword, a parsing exception is thrown:

CompositeParserException: Parser errors:
(12:3): expected: #EOF, #TableRow, #DocStringSeparator, #StepLine, #TagLine, #ScenarioLine, 
#ScenarioOutlineLine, #Comment, #Empty, got 'Rule: 

Are there any plans to include the keyword, or is it not yet on the roadmap since it hasn’t been incorporated into all implementations of Cucumber yet?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
irahovcommented, Dec 2, 2021

I’d like to emphasize the importance of Rule support, especially in big projects. If you think that cypress-cucumber-preprocessor is suitable for enterprise projects please do add that support or at least provide some feedback when this can be expected.

The current behavior is a bit strange. I add just one Rule: and Background: in it. - OK I add two rules - NOT OK I add Feature: Background: Rule: - NOT OK

By NOT OK I mean there is a parse error:

Error: Webpack Compilation Error
./cypress/integration/edge-gateway-l2vpn.feature
Module build failed (from ./node_modules/cypress-cucumber-preprocessor/loader.js):
CompositeParserException: Parser errors:
0reactions
irahovcommented, Dec 7, 2021

Hi, With my previous note, I didn’t mean to be harsh. I’m sorry for that. My frustration came from the fact that people were asking questions and there had been no responses for months even for more than half a year. Also when I used ‘enerprise’ I didn’t mean ‘a company’, but rather something serious. Also a MIT project doesn’t mean lots of features and fulfilling everybody’s desires, but it also does not exclude accountability, where the maintainers answer questions. Once again I’m sorry if I had been harsh.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cucumber Rule Keyword - ProgramsBuzz
Supported in Cucumber: Rule was added in Gherkin v6 in late 2018. In Cucumber, it is an optional keyword available from the Cucumber...
Read more >
Cucumber Rule Keyword - YouTube
The Rule keyword is simply a grouping construct. It groups several scenarios that belong to the same business rule.
Read more >
Is the "Rule" keyword supported? · Issue #143 - GitHub
The Rule keyword was introduced in v6 of Gherkin and this version of the JavaScript implementation has quite different API and is built...
Read more >
Gherkin Reference - Cucumber Documentation
The purpose of the Rule keyword is to represent one business rule that should be implemented. It provides additional information for a feature....
Read more >
Gherkin Keywords - Cucumber - Tools QA
Rule keyword was introduced in the latest version 6 of cucumber to represent the implementation of a business rule. Rule is meant to...
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