InterviewSolution
| 1. |
What is BDD (Behavior-driven development)? |
|
Answer» BDD is an extension of TDD. The major DIFFERENCE between TDD and BDD are:
This difference brings in the need to have a language which can define, in an understandable format. Features of BDD
Example: Scenario: Duplicate email Where someone tries to create an account for an email address that already exists. Given I have chosen to sign up But I ENTER an email address that has already registered Then I should be told that the email is already registered And I should be offered the option to recover my password Now after a look at the above example code, anybody can understand the workings of the test and what it is intended to do. It gives an unexpected powerful impact by enabling PEOPLE to visualize the system before it has been built. Any of the business users would read and understand the test and able to give you the feedback that whether it reflects their understanding of what the system should do, and it can even lead to thinking of other scenarios that need to be considered too. Advantages of BDD:
|
|