Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll

- 2x 2x
- 1.75x 1.75x
- 1.5x 1.5x
- 1.25x 1.25x
- 1.1x 1.1x
- 1x 1x
- 0.75x 0.75x
- 0.5x 0.5x
Behavior Driven Development (BDD) is an approach to building software. In BDD, instead of writing code and then seeing if it works, you write tests first and code second. This means you can use tests as an outline for the application code you actually want to write.
Video review
- Behavior Driven Development is like creating a plan before you write your program
- Start by describing how the program should work, then write code until it works the way you expect it to work
- If your tests are good, you can be confident that your functions really do what they’re supposed to do
Red > Green > Refactor
- Write the tests, even though at first they’ll fail
- Fix the function in the first way that comes to mind, just to get your tests passing
- Go back and refactor the function for improvements, repeating the cycle until you’re ready to move on
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up