Step 0: Understanding BDD
Today, we’re going to be learning about the Jasmine BDD testing framework. But we’re stopping here for a detour first, to talk very briefly, about BDD and TDD. If you’re not familiar with these acronyms, they stand for Behaviour-Driven Development and Test-Driven Development. I’m in the middle of learning about what each of these is in practice and how they are different, but here are some of the basic differences:
BDD and TDD … stand forBehaviour-Driven Developmentand Test-Driven Development.
TDD in its simplest form is just this:
- Write your tests
- Watch them fail
- Make them pass
That’s pretty easy to understand, eh?
BDD is a little more complex: as I understand it right now, I don’t think that you or I as a single developer can actually practice it fully; it’s more of a team thing. Here are a few of the practices of BDD:
- Establishing the goals of different stakeholders required for a vision to be implemented
- Involving stakeholders in the implementation process through outside-in software development
- Using examples to describe the behavior of the application, or of units of code
- Automating those examples to provide quick feedback and regression testing
To learn more, you can read the extensive Wikipedia Article (from which those points were taken).