Twenty years ago, I had a problem. I was working as a consultant introducing teams to ideas like continuous integration, pair-programming, and test-driven development. I was, and still am, a fan of TDD, and I was frustrated with how hard it was to get people to even try it. Most of the objections stemmed from the word ‘test’.
I tried changing my approach, using language like ‘code example’ and ‘executable spec’, and not mentioning tests at all, and that seemed to land better. People were certainly more willing to give it a try!
Fast-forward 20 years and I am amazed at the traction BDD has had. It has spawned a host of books, most of them fantastic, none of them by me. It gave rise to an ecosystem of automation tools starting in the Java and Ruby worlds as JBehave and RSpec respectively, and then exploding into the Gherkin-based tools of Cucumber, Reqnroll (née SpecFlow), and PHP’s own venerable behat.
Since PHPUK is also 20 years old this year—happy birthday!—it seems appropriate to look back over two decades of BDD to see how far we have come, what might be coming next, and why I think Cucumber-like tools are overkill for almost any use case (but fantastic when they aren’t).