Live data from Hacker News

Saving Agile with BDD and Cucumber

blog.fogcreek.com

11–20 of 48 posts

Re: Saving Agile with BDD and Cucumber

#11

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

Thats perhaps why he says in the interview it's not important to write all the tests out in detail right there and then, but the discussion between the developer, business person and tester is the important part. (paraphrased)

Re: Saving Agile with BDD and Cucumber

#12
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 one writing or maintaining the tests. You just have to have a DSL that the test maintainers can use, and they handle writing and maintaining. But thats it.

If the devs are the ones who have to write the tests, as is far more common; then interfacing with capybara directly is much much better than bringing cucumber into the mix. I used to be into cucumber, but once i switched over to a leaner approach i found testing was much easier and more enjoyable.

Re: Saving Agile with BDD and Cucumber

#13
vow what a Joke! I guess this Cucumber guy has nothing else in his life to do. He talks about how testers and developers should interact as a solution to fix the Agile process which sucks anyway no matter what. so developers need to worry about the stupid tests that they need to pass which are created by the testers. Testers are way less qualified than developers in most companies obviously there are exceptions here and there. I am a developer I write my own tests instead worrying about tests created by testers. Make the development experience more enjoyable than making it tedious. Fuck you cucumber guy. btw Matt Wynne, you do look like a cucumber. go stick that BDD in your butt hole.

Re: Saving Agile with BDD and Cucumber

#14
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 specification (written in Gherkin's Given-When-Then syntax), and it always remains up-to-date because the developer needs to update it as corner cases or new scenarios arise. (Of course, this assumes you are running continuous integration with something like CircleCI and tracking code coverage with something like Coveralls.io.)

I don't think there's anything magic about Cucumber, vs. Turnip " rel="nofollow">https://github.com/jnicklas/turnip>, or Spinach " rel="nofollow">https://github.com/codegram/spinach>, or even Steak " rel="nofollow">https://github.com/cavalle/steak>. But I do think the Gherkin syntax encourages use of clear descriptions that make it easier for a new developer (or yourself, 6 months later) to understand what a feature is supposed to do, and in particular, to avoid accidentally breaking it as you make other changes.

Re: Saving Agile with BDD and Cucumber

#15
post #5

Most of the time I've spent with Cucumber in actual work projects has been wasted on trying to write steps to wrap idiosyncratic UI patterns which aren't handled out of the box - of course its been years since then and the UI on that project was particularly horrendous. That being said, I do find a lot of value in being able to translate text from a story - "As a user I should see " directly into a test.

You can easily get very close to this with Capybara: 'expect(page).to have(:css, ".article table th td", text: " hello world ")' Save functionality but you won't have to support that silly regex abstraction layer. If this is still not human readable enough, I would still recommend writing your own DSL on top of Capybara rather than matching to regexes like Cucumber does.

Re: Saving Agile with BDD and Cucumber

#16

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…

> rspec + capybara is much more enjoyable and maintainable

It looks like it's limited to testing web sites and is not really useful for me. Gherkins can be adapted for all kind of tests (even if I agree that it's far from perfect).

Re: Saving Agile with BDD and Cucumber

#17

vow what a Joke! I guess this Cucumber guy has nothing else in his life to do. He talks about how testers and developers should interact as a solution to fix the Agile process which sucks anyway no matter what. so developers need to worry about the stupid tests that they need to pass which are created by the testers. Testers are way less qualified than developers in most companies obviously there are exceptions here…

Almost funny enough to upvote! But... no. :)

Re: Saving Agile with BDD and Cucumber

#18

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.

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

Re: Saving Agile with BDD and Cucumber

#19

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…

BDD is more about communication, not regression testing. If all you want is testing you never really needed cucumber.

Re: Saving Agile with BDD and Cucumber

#20

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've never worked somewhere where non-devs have done anything with tests. They've been too busy doing non-developery things.
Post reply on HN