I’ve been having a lot of rants about Cucumber of late, as it’s the new shiny thing for agile teams. Does anyone else have issues with it? I’ve asked all of my programmer friends to convince me of its worth, and they’ve all failed so far. I’ve not seen it adding any value above building a good API (and I see it bringing a lot of negatives relative to other possible approaches).
In my experience, I’m seeing -
- Customers/non-programmers never write the tests (because they have very little interest in specifying everything in given-when-then. They just want to tell us what they want. And it doesn’t make much sense to specify everything in that format anyway).
- Customers/non-programmers write the tests but it focuses the test effort on writing those kinds of tests, rather than other testing that seems to add more value.
- The tests are written in English, but what the test actually does depends on how the developers convert the english phrases into code (so there’s no guarantee it tests what the customer intended anyway).
- Avoidance of conversation (ie. tests as contracts).
- Cucumber and the related tools (through the toy examples they provide) encourage developers to put lots of implementation detail into the tests (and sometimes to do a lot more testing through the GUI/http layer rather than pushing some of that testing down).
- Refactoring sucks as we lose IDE support.
- Much heavier test artefacts (when a lot of the teams I work with are already struggling with the weight of their agile test automation).
- A continued focus of tests on what the system does and not why it does it and the business outcome.
- Anecdotally, I’m not seeing better outcomes than people were getting with other approaches. I realise it may be leading to better designs, but then I’d expect to see improvements somewhere in the process. That looks like it would require better modelling skills than I’m seeing in most of the cucumber tests on my projects.
Most of the examples that I’ve seen where people are claiming success are fairly small applications. I’m not seeing the approach scale that well. Yes, most teams could write their cucumber tests better, but even then, in my experience, other approaches would be more effective and more efficient.
Any thoughts? If there’s interest, I’ll try and post some examples of what I think those tests might look like if we pushed them into other forms.