Friends don't let friends write tests with Cucumber.
I prefer using Courgette for my tests.
Cucumber is quite cool
Every tool sucks when the tool becomes primary. BDD is powerful for gaining shared understanding of acceptance criteria. The tool is secondary.
Why does anyone write anything with a cucumber? A pen is much more convenient to write with.
So ... There's 3 major critiques available here that I can think of, and I'd like to know which one(s) you're making. (1) Cucumber is a crappy tool. Use something decent like robotFramework or SpecFlow or RSpec. (2) E2E tests are universally crap. Don't do that. (3) BDD isn't an approach I like, even if you don't write the test automation, just the natural-language, OR you do non-E2E tests in the BDD. I shifted from Cucumber to Ruby near 2017, and Stopped writing the E2Es in 2018. But I do like Test-First-in-English-with-everyone-talking...and I can sometimes use that to write a lower-level test that's hooked to the near-gherkin english language test.
The trouble with tools like Cucumber are that they pretend to be open to non-technical people, with their 'natural language'. But it isn't really natural language (if the step is "When I go to login page" and you try "When I go to the log in page" it won't work) and anyway, you need to have a technical mindset to design and write the correct tests, whatever language and notation you use to record it. You can drive your Selenium (or whatever) tests just as well by writing code that actually looks like code, and then it's clear that it is code.
I’ve had good experience with them although in these projects we didn’t have any automated testing at all to start with. I had tried isolated unit tests with the database access faked out, but I found this type of test didn’t catch a lot of bugs. I’m leaning more towards unit tests including the database access these days as the bugs tend to be in SQL as that’s not that wasn’t tested. I started using specflow to write acceptance tests against a deployed test system and it allowed me to test way quicker compared to manual testing. None of these tests went through a UI. All of the test were written by devs, testers could easily manipulate for generating manual test setups more quickly. The biggest issue I ran into was test speed after writing 200 tests the whole set was taking 20-40mins to run. The main thing I like is the tables vs having them just in code, but ultimately you could do it all in regular unit test.
Paul Hammond but my friend said I would be in a pickle if I didn’t write gherkins and apply them with cucumber/spec flow/fitness 🙃 We all know what trouble we can find ourselves if we turn ourselves into a pickle disclaimer: this has went on a tangent that has nothing to do with said content. I take no responsibility for your interpretations, actions, and quest as a pickle. Plot holes 🕳️ are null and void
Experienced Coach and Trainer for Agile, Lean, technical practices and human behaviour.
2wI do like cucumber but recognize that it's often used in places where it's absolutely the wrong tool for the job.