4 ms·
BDD is great as a concept but Cucumber/RSpec/Gherkin/Behave/etc. is an absolutely terrible DSL for implementing it: * It's verbose. * It's not type safe. * I
by hitchstory 3y ago
BDD is great as a concept but Cucumber/RSpec/Gherkin/Behave/etc. is an absolutely terrible DSL for implementing it:
* It's verbose.
* It's not type safe.
* It desperately needs some kind of inheritance - most user stories branch from other user stories (e.g. put product in shopping cart->purchase product). The only way people who use it can deal with it is by concealing critical details in code or by writing massively repetitive stories.
* What other language has a parser that routinely asks you to write regexes to get things to parse?
None of these things are fixable and the creators have largely reacted to the complaints with gaslighting: "you're just using it wrong".
It can be used effectively if you align the stars correctly but usually not.
The one thing it does get right is not being turing complete - there's clear value in not using code to describe scenarios.
- drewcoo 3y ago> Cucumber/RSpec/Gherkin/Behave/etc. is an absolutely terrible DSL I wouldn't lump RSpec in with the rest of those. Spec-style frameworks (like granddaddy RSpec) are terser. They don't have layers of indirection. They're intended to help devs think about how code will be used, not to make code look like English.