Hacker News new | ask | show | jobs
by rr888 1199 days ago
We tried it once and the semi-tech SMEs had no desire to write cucumber code so it ended up being the developers who hated writing in a second language. No real benefit.
2 comments

The ideas behind BDD are sound, but I've never seen it work out in the real world.

In reality we as programmers need to turn what the stakeholders want into code. They will talk in meetings: we better take notes. They will write things down [in English or whatever language they speak], but it won't be code. There will be conflicting requirements, and we as programmers need to understand the topic well enough to make reasonable decisions on the easy stuff, while going back on the harder stuff - easy and hard is as the decision makes see things not as a programmer sees them: better know that too.

Once you figure out what stakeholders want turn it into code. It is useful to have integration tests for scenarios that they care about (some of them are stupid - the last version of an embedded product I worked in had a 5 length array, and it turns out some customers needed 7, and later analysis proved that 7 was the mathematical max anyone would ever want. The current version is C++ using a vector so the potential length is unlimited (limited by free memory), but we still have a test proving 7 works because the mistake in the past burned enough people)

I've done it plenty, just never in the context of cucumber (I find it gets in the way).

E.g. When a front end team says "we need an API to do X" to backend I dash off a couple of draft example API calls and responses and organize a 10 minute meeting where I show the draft to the front end team and back end team (stakeholders).

That discussion we have in the meeting where we 1) talk about what needs to go in the request and response while looking at it and 2) edit the example scenario and 3) finally lock down a version everybody agrees upon is, essentially, BDD in its purest form.

I'm pretty sure a lot of people do this type of thing without even realizing that it's BDD.

(A lot of people also dont do it and the mismatch in expectations only gets realized and negotiated around once there is code ready to deploy. This is an awful waste of time and effort.)

> some of them are stupid

This doesn't sound like a stupid test at all: it safeguards against a regression by preventing anyone from changing the vector code. In an ideal world every bug would be caught by a human once and only once, and thereafter be tested.

I don't mind developers writing the Gherkhin as long as the SMEs can read and sign off on the Gherkhin. They won't read a unit test for sure.