QASymphony / Blog / Behavioral Driven Development: TDD with a User Focus
Behavioral Driven Development: TDD with a User Focus
As a subset to Test-Driven Development (TDD) – Behavioral-Driven Development (BDD) seeks to accomplish the same goals as TDD: It is an Agile testing process that stays closely aligned to customer needs as they evolve. But the key difference is that while TDD is developed strictly from the test, with BDD there is still an initial requirement driven from end-user behavior.
As with most development processes, BDD starts with a functional document. However, with this process, the idea is to build a consolidated specification that can function as a guide for the developer, tester, and product owner based on the behaviors the system should exhibit. These specifications are typically transformed directly into an automated test that is used as the benchmark to determine if the feature is complete. The test typically fails several times until it eventually passes, as which point the new feature development is complete and the code will then be refactored until the test passes. Once the test does pass, the feature is considered complete.
The whole BDD process is kept lean by streamlining the documentation that must be created, but it relies heavily on the collaboration of the product owner, developer, and tester as one unit One of the unique facets of BDD testing is the use of Cucumber as the leading automation tool.User behavior is initially described in plain text, step definitions are added and then the feature is tested. The testing platform is designed for simplicity and reuse of assets, with testers being able to leverage many of the previous automation assets created The efficiency driven from this well thought out automation strategy is one of the most intriguing aspects of BDD and one of the key differentiators from other Agile methodologies.