Live data from Hacker News

Saving Agile with BDD and Cucumber

blog.fogcreek.com

21–30 of 48 posts

Re: Saving Agile with BDD and Cucumber

#21

> Saving Agile with BDD and Cucumber First value of Agile Manifesto: "Individuals and interactions over processes and tools "

Except that when most teams adopt the SCRUM flavour of Agile, they're dropping much of the processes and tools that help (pair programming, test-driven development, etc.) So yeah, it's important to value individuals and interactions but not at the expense of light-weight processes and tools that help deliver a quality product.

Re: Saving Agile with BDD and Cucumber

#23

The biggest gain of Cucumber I have seen is executable specifications. That is, every development task is described somewhere, whether it's pages and pages of a Google Doc or a couple lines in a Github issue. Code then gets implemented, and is almost certainly iterated over time. The question is, does the specification ever get updated to match the code's behavior? With Cucumber, you have a relatively clear specifica…

I found this to be the case when writing a Cucumber test for an Emacs package. You can see an example here: https://github.com/omouse/org-doing/blob/master/features/org...

It was more helpful to write "Given I have an non-existent file" than to write "(not (file-exists-p org-doing-file))". One can be read by others who don't understand Emacs-Lisp and they'll understand the concept, while the latter can only be read by Emacs-Lisp developers. With the Gherkin syntax I'm free to move my tests over to another text editor and implement code that's specific to the text editor. For example, I could use my tests to implement the package for VIM or Atom (something I might do on a weekend).

The best part is that you have the spec under version control and locked down instead of spread across.

At work no one is really updating the functional spec of our project and it means we have information that's falling through the cracks and is in separate emails or IMs. Executable version-controlled specs have to be maintained but at least they're in one spot.

Re: Saving Agile with BDD and Cucumber

#24

Earlier quoted context omitted.

The myths of having non-developers read tests have been dispelled for years. I'm not even going there.

That's too broad a claim. Why are non-developers in your organization not willing/able to read test cases?

I won't be quite so pessimistic about the possibilities as other people here, but I share their experiences. It seems possible in theory but nearly impossible in practice to walk the tightrope of creating a language convenient enough for non-technical people to read and write without getting frustrated by it, while retaining its programmability and maintainability without driving the developers crazy.

It's just a special case of the general problem with tools that aim to be easy for non-programmers to use while doing the same things as programming languages. It's always a leaky abstraction.

Re: Saving Agile with BDD and Cucumber

#25

> Saving Agile with BDD and Cucumber First value of Agile Manifesto: "Individuals and interactions over processes and tools "

> First value of Agile Manifesto:

> "Individuals and interactions over processes and tools"

Right. That means processes and tools should serve individuals by supporting their interactions, rather than individuals and their interactions being reformed to fit preconceived processes and tools. That doesn't mean that processes and tools are irrelevant, or that sharing experiences and ideas about how particular processes and tools can serve individuals in their interactions is contrary to Agile.

(In terms of promotion of processes and tools, it really has nothing directly to do with whether or even how those things should be promoted: it does have a lot to do with how -- and who on -- teams should evaluate processes and tools that are being promoted, though.)

Re: Saving Agile with BDD and Cucumber

#26

Earlier quoted context omitted.

One of the nice things about BDD tests in Cucumber/Gherkin is that they're written down in plain text (English), a language that managers, testers, and developers all presumably speak. The Gherkin language is actually very useful for facilitating communication/interactions.

The myths of having non-developers read tests have been dispelled for years. I'm not even going there.

They haven't, in my direct experience.

I've found it very useful, where there's ambiguity about how a particular feature works, to write a Gherkin spec that describes it. It's easy to understand, and can be agreed upon or even edited by my colleagues who aren't developers, but remain part of a CI process.

YMMV, but this remains one of the lazier dismissals of BDD.

Re: Saving Agile with BDD and Cucumber

#27

The biggest gain of Cucumber I have seen is executable specifications. That is, every development task is described somewhere, whether it's pages and pages of a Google Doc or a couple lines in a Github issue. Code then gets implemented, and is almost certainly iterated over time. The question is, does the specification ever get updated to match the code's behavior? With Cucumber, you have a relatively clear specifica…

Also somewhere on this continuum between gherkin and rspec: rspec-given[0]. Keeps Given-When-Then, but ditches the feature / step file split.

[0]: https://github.com/rspec-given/rspec-given

Re: Saving Agile with BDD and Cucumber

#28

cucumber? what is this, 2013? rspec + capybara is much more enjoyable and maintainable. Maintaining a cucumber test suit is basically a nightmare. I hate writing tests for it, I hate fixing tests in it when they break, and i hate the random cucumber exceptions that cause random failures. and should you come to a point where you want to optimize the test suit performance, good luck! cucumber is good if you're not the…

You're right, in that if you are writing Gherkin specs as a replacement for something you can implement using Capybara, then I don't think you'll get the most out of Cucumber – it becomes an unnecessary abstraction.

If you're using it to communicate features to other team members, it can be super-useful, since it's much easier to comprehend that the equivalent developer-friendly code.

Re: Saving Agile with BDD and Cucumber

#29

cucumber? what is this, 2013? rspec + capybara is much more enjoyable and maintainable. Maintaining a cucumber test suit is basically a nightmare. I hate writing tests for it, I hate fixing tests in it when they break, and i hate the random cucumber exceptions that cause random failures. and should you come to a point where you want to optimize the test suit performance, good luck! cucumber is good if you're not the…

Your opinion.

Re: Saving Agile with BDD and Cucumber

#30

Earlier quoted context omitted.

One of the nice things about BDD tests in Cucumber/Gherkin is that they're written down in plain text (English), a language that managers, testers, and developers all presumably speak. The Gherkin language is actually very useful for facilitating communication/interactions.

The myths of having non-developers read tests have been dispelled for years. I'm not even going there.

But non-developers read specs all the time. The BDD goal is to create readable specs that also work as executable tests.
Post reply on HN