SpecFlowOSS / SpecFlow

#1 .NET BDD Framework. SpecFlow automates your testing & works with your existing code. Find Bugs before they happen. Behavior Driven Development helps developers, testers, and business representatives to get a better understanding of their collaboration
https://www.specflow.org/
Other
2.24k stars 754 forks source link

Documentation request: Remove language saying Background Rules are supported #2505

Closed kamranayub closed 2 years ago

kamranayub commented 2 years ago

Product:

What is missing:

On this page it explains I can use the Background under a Rule:

https://docs.specflow.org/projects/specflow/en/latest/Gherkin/Gherkin-Reference.html#background

However, it wasn't working and I discovered #2117 and it was closed with the explanation:

https://github.com/SpecFlowOSS/SpecFlow/issues/2117#issuecomment-690925970

Ah, you are using the background of the Rule. That is not supported in SpecFlow and will never be. Cucumber has support for it, but it will be removed in the future. At the Cukenfest 2019 we (Cucumber & SpecFlow developers) decided, that we will remove the background from the rule keyword again. It makes it too hard to read with multiple rules and backgrounds and then also feature backgrounds.

It would be nice to remove the language for it if I can't end up using it.

FWIW I think it seemed to make it easier to organize my scenarios (per-rule variations on background steps) but I understand the reasoning. I'll just re-organize into separate files I think 🤔

SabotageAndi commented 2 years ago

In the meantime it got a little bit more complicated with the Backgrounds in Rules. Because Cucumber and we never removed it from the Gherkin specification and some Implementations now implemented it, we decided to change our decission. Rules will have backgrounds. This was made 2-3 months ago. Implementing them in SpecFlow will take some time, because it isn't the easiest change.

@alimogithub What do we do with this in the documentation? Should we add some notes, that it is in the standard, but not yet supported?

alimogithub commented 2 years ago

@SabotageAndi It makes sense to comment it out of docs for now until it's supported again. @kamranayub thanks for raising this. I have removed it from docs for the time being.

kamranayub commented 2 years ago

Thanks all and thanks for making SpecFlow so awesome 😎

github-actions[bot] commented 2 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.