I think it’s useful to look at where the idea of “feature files” came from. BDD is first and foremost about delivering customer value through collaboration. Closing the loop between demand, implementation, validation, and customer impact builds trust, and highlights where in the process things can be improved.
The biggest gap we saw at the time (early 2000s) was the gulf between what people (said they) wanted, and what developers (said they) built. Martin Fowler and I described this as The Yawning Crevasse of Doom. The problem is with the “(said they)” part. Written requirements are notoriously tricksy. They are incomplete by definition – I write them using my mental models, norms, and assumptions, you read them using your mental models, norms, and assumptions. This is known as the naïve realism bias: I think that you think like I think. Written specification is ambiguous by necessity – it cannot contain all the answers because the process of solving the problem changes the problem. It is a complex adaptive system.
So BDD grew out of a desire to reduce this crevasse by leveraging ideas from TDD and Domain-Driven Design. If developers write examples to guide the development, and if these examples can be self-documenting – literally writing out what they are verifying as they run – then they can become a powerful communication tool. There was an early tool called AgileDox that did this. It translated JUnit test names “testThisDoesSomething” into text “this does something” while the tests were running! This is what started me on test names as documentation.
Once you have this, the next level is to have your examples print out each line of what they are doing, not just the title. From here it is a short hop to a given-when-then structure and narrative scenarios.
All this is to say, I have always viewed plain text rendering of scenarios and tests as an output of the build rather than an input. It takes a lot of hidden work and complexity to map plain text feature files to the sequence of steps that execute, and there has to be a significant payoff before I will even use something like Cucumber. The vast majority of BDD I’ve ever done – at the story and scenario level – has used Plain Old JUnit or pytest. As long as a non-technical stakeholder can see the results of the run in plain text, we have eliminated that gap.
Liz (and others I’m sure) has said before that the real communication win is in the scenario titles. “The one where …”. This encourages conversations around scope and edge cases which is where much of the ambiguity hides. Making the scenarios both automated and self-documenting goes a long way to closing that feedback loop I mentioned at the beginning, and the Three Amigos conversations (h/t George D.) are the perfect forum for surfacing those scenarios.
So yes, I agree people are mostly using feature files incorrectly, because they are using them at all!
Kind regards,
--
Daniel Terhorst-North
+44 (0)7580 099876
https://dannorth.net
@tastapod
Dan North & Associates Ltd, 14 Lady Hay, Worcester Park, KT4 7LT, UK
Registered in England and Wales, no. 6716833. VAT no. GB 137 7822 88
--
You received this message because you are subscribed to the Google Groups "Behaviour Driven Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to behaviordrivendeve...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/behaviordrivendevelopment/9fcc6708-d493-4935-8114-bbdb79094cf2n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/behaviordrivendevelopment/011401d6c252%24c88cb620%2459a62260%24%40dannorth.net.
To view this discussion on the web visit https://groups.google.com/d/msgid/behaviordrivendevelopment/CAFb2DEH3VsiA3XM7b_66TgQZPS4tK1Zg7ai4QXx8aqyUcx-EyQ%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/behaviordrivendevelopment/CAMxjd8Nt%2BM9GY3VtjFDim2ug%2BvGTXZz_QNHC-hyKfvdOzn%3DTQw%40mail.gmail.com.