Hacker News new | ask | show | jobs
by bradhe 1201 days ago
“Getting stakeholders involved in the design process” is giving me BDD flashbacks. It’s Gherkin all over again.
2 comments

The good parts of SOA, the event and CQRS stuff, data administration (and curation recently), and BDD all reduce to the same set of ideas.

But then there are always people that look at those and keep exactly the bad parts. Like the links from the article, that all but define event-driven architectures as software that use Kafka.

haha, weren't they meant to be writing the tests by now?
I was happy that we got rid of Cucumber at my workplace in 2018.

Two weeks ago at my new workplace I sat through a colleague's tech talk about how to test with Cucumber.

A bit naviely using cucumber seems like a good idea. Could you share some advice or resources on why it might not be ?
You're setting up an extra layer of difficulty around the system. Sure, the English is 'easy' to read, as long you do the hard work of converting the test cases to English. Then when something goes wrong or you want to know what's really going on, you have to translate from English back into the system's language to think about it.
The utility of Cucumber, it seems to me, is that it makes it more likely that the business level description of the test cases is maintained in sync with the technical implementation, which (if the test cases aren’t squirreled away in the tech team away from the eyes of people responsible directly to customers) makes it less likely that you experience drift between what you are testing and what users rely on the system to do.

Its not that it makes testing easier, its that, in the right social context, it makes testing more likely to be aligned with business intent.

A) Business will never read your tests. Whatever you are smoking that has you thinking they will, stop it. A.5) In the event they do, they will never extract the nuance of the glue.

B) that extra layer of translation, when combined with a multitude of different people who refer to or model different things in different ways is going to devolve into the Tower of Babel, and you'll soon find yourself in step level meta-hell trying to bridge in new cross cutting abstractions into huge swathes of code that will break for reasons that seem entirely irrelevant to the hackneyed step grammar.

C) Seperation of Concerns: Writing English/Natural language to be understood utilizes a fundamentally different approach to Authorship than does code authoring. Write code that works, then. Explain it with comments. Do not use DSL's because then you're just adding writing a parser layer on top of writing a test framework that works.

D)If I see one more spelling mistake I'm going to....

BDD is doable. As a testing professional though, I always emphasize the parts wherein the work is packaged and delivered in entire flows rather than on using a tool like Cucumber and making my testers suffer through writing English for people who will never look at code, even if you threatened them with bodily harm if they didn't.

Do what works for you though. I find it works okayish for integration or system level testing... But it's way to heavy for anything else.

Not only that, but it enables product owners to actually express the features they want, in such a way as they can be implemented. Without that devs and product owners tend to second-guess each other.

I've recently introduced Cucumber and it's been an incredibly useful framework for collaborating between developers and product owners. I'd recommend "Writing Great Specifications" by Kamil Nicieja.

I own several apps that I wouldn't be able to maintain by myself without good end to end tests. The nice thing about cucumber is I can come back to a test a year later and instantly understand what it's testing for at a requirements level vs. having to reason through the gnarly details of what it actually does, then work backwards to the original requirement.

It shines the most in gnarly login/sign up flows that always evolve into all kinds of weird edge cases over time.

Maybe they'll get ChatGPT to write them for them.
Maybe we will?