4 ms·
What's wrong with BDD? Admittedly, I never dealt with Cucumber.
by DarkNova6 3y ago
What's wrong with BDD?
Admittedly, I never dealt with Cucumber.
- packetlost 3y agoBDD is, IME, only really good for testing UI behavior (I've seen some pretty decent JS BDD testing frameworks, but have limitex xp with them). It can be good at that because those behaviors can usually be expressed well enough in natural language. But I've seen it shoehorned into data-centric UI-less applications that are just a massive pain to deal with. Half the point of most testing frameworks is getting more done with less typing/overhead, but Cucumber and BDD is sorta the exact opposite: do less with more typing by trying to describe complex concepts in natural language. Cucumber mostly exists to upsell naive MBAs and project managers on their "pro" tools.
- hitchstory 3y agoBDD 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.