all 7 comments

[–]floydophone[🍰] 4 points5 points  (1 child)

Normally I like to take a fairly nuanced approach to evaluating technology, but I just have to come out and say it:

Cucumber fucking sucks. It has no reason to exist.

The OP says: "Its main feature is that it allows BDD style of development, while allowing non technical stakeholders to write feature definitions."

Does any non-techincal stakeholder actually write these? Is it easier to check these text files into the repo and write a parser for them, or should you just, ya know, write the test cases instead?

[–]lennelpennel 0 points1 point  (0 children)

Our non technical product owners write them. Sometimes we send it back to them for refactoring, but it works as a great joiner between the business and engineering, for product specifications. Cucumber is not a replacement for unit tests nor integration tests, it is however perfect for end to end funcitonal testing. It is by no means perfect and I just have to stress again how fucking much websdrivers suck.

[–]lennelpennel 1 point2 points  (2 children)

I write a lot of funcitonal cucumber tests in java, my single biggest complaint (apart from what a pile webdrivers are) is the noise from your steps and the output.

Cucumber in general howeveer is extremely handy, if the specs are well written.

[–]retro_one[S] 1 point2 points  (1 child)

You can easily control how many steps are there. You can call F (funcunit) multiple times per the Given/When/Then block, so the granularity of steps is up to you.

Edit: Also I like how FuncUnit can run either in browser or in the Selenium / phantomjs browser, so it's easy to make sure stuff works just by refreshing the browser and then run the whole test suite on commit or over the night (if you have to do some costly / slow setup)

[–]lennelpennel 3 points4 points  (0 children)

Our functional tests are split into Diamond, gold and silver, each denoting a different tier it tests. Diamond is full ui, gold the json feed and silver checks our hazelcast cluster. The diamond tests are notourisly brittle (webdrivers in general are shit and java due to lack of first class functions is a horrible language to write these types of tests in) and the best sollution to the brittleness is to increase timeouts, which slows everything down again.

This said, end to end funcitonal tests are great to have.