Test Driver Development (TDD) refers to a process by which
you develop and test your code. In TDD approach, development process starts from
writing the test before coding and run that test along with another tests that
fails, because the specified functionality doesn’t exist. Now, write the
minimum amount of code that can make the test to pass. After that, restructure
or remove duplication in the existing code without changing its behavior. Repeat this loop over and over until feature
completion. It means that we are repeating the process from RED-GREEN-REFACTOR
in a cycle.
Behavior Driven Development (BDD) is the enhancement of TDD,
by which you can approach development and testing. Unlike TDD, BDD is more
focused on how you test than when you test. In BDD, your tests are focused on
behavior rather than implementation. It means that tests have to been written how
the customer’s / user’s will use the software or expected experience, for the
given input whether they receive the expected result. i.e., if I click on
“Login” button on, I expect user should be able to login with valid credentials
else should be able to see proper error message.
No comments:
Post a Comment