Рет қаралды 829
A discussion I had while trying to apply BDD to a backend API I was building out on a team. BDD implies more than just test driving code, but when we talk about the TDD part of BDD, "BDD" is an outside-in TDD approach driven by the initial communication part of BDD (talking with stakeholders, creating story cards, and using those to drive implementation).
J.B. Rainsberger, is part of the "2nd Wave" of TDD practitioners. He learned much of what he knows from the original folks who TDD'd as well as he wrote the book JUnit Recipes.
UPDATE (5/12/2017): 3 years later, I've matured a lot more around BDD/TDD, understand the BDD part much more, and I've decided to no longer write gherkin as in -automating- specs --unless-- the business writes them for the developers. PMs and QA should be writing cucumber specs but only if developers always take those and run with it as a start for the developer's BDD/TDD cycle. And...as a developer just start writing mocha BDD-style UNIT tests as part of the TDD cycle. I don't write cucumber tests. What I do now when there is no buy-in from the business (--they-- don't want to create cucumber specs), is as a developer I follow the BDD/TDD unit test cycle/Test Driven Development cycle for my Test Driven Development: www.google.com/url?sa=i&rct=j.... I use the gerkin sometimes to think about the scenarios for my own code, but I don't write cucumber tests...I start writing BDD-Style unit tests in my TDD flow. Currently I do this with Mocha + Chai + Enzyme for front-end, and Mocha + Chai for backend.
About J.B. Rainsberger:
He's very actively teaching companies how to transition to Agile, how to TDD, and more. He runs a great online Training course on TDD here and also a great blog here: jbrains.ca
J. B. was gracious to have given me 1.5 hours today to answer
some questions around BDD and REST. And really just BDD in general as well.
It ended up being a very useful conversation not only to me but you may benefit as well!
Also Check out J.B. great talk on Surviving Your Inevitable Agile Transition • Surviving Your Inevita...