Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Start a free Courses trial
to watch this video
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