Book Image

Learning Behavior-driven development with Javascript

Book Image

Learning Behavior-driven development with Javascript

Overview of this book

Table of Contents (17 chapters)
Learning Behavior-driven Development with JavaScript
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Summary


We have seen that TDD and BDD are different techniques. BDD is a refinement of TDD; it emphasizes that the important thing is to test behaviors of the system that are relevant to the stakeholders and users.

BDD allows us to write more coherent test suites that can evolve at the same speed as our requirements. A good BDD test suite will give us the ability to track which behaviors are not working correctly in our system and which tests should be changed when we need to change the functionality of the system.

Finally, it is important to distinguish between BDD and integration tests. An integration test checks several problem domains at the same time. This often leads to confused tests that try to test everything and, in the end, are not very effective. Instead, a BDD test suite checks a single problem domain in isolation. This allows the tests to be focused, clear, and easy to write and maintain.