Test Driven Development:- As a name suggest test driven development is the development model that starts with developers writing tests and then writing code so that all tests can pass.
Acceptance Test Development is quite similar with a difference in the way tests are written. These tests can be written by subject matter expertsm business analysts, testers with product owners. The idea is to give developers upfront visibility of the acceptance criterias
Following are 2 common ways of writing behaviour driver tests
Given I am a getskills existing signed up user When I select on join against course on Courses Then I should be able to fill in my credentials And buy the course
I-> login getskill portal as a valid user
I-> Click on Join on Public Course page
I-> Fill details on paypal page
I-> Submit the form
I-> See the payment confirmation
The first example is from a popular BDD tool called cucumber and second is from Codeception
From the example it can be concluded that these test elaborate the behaviour of the system. It is about telling the developers what should be the behaviour of a system in particular use case.
BDD can completely transform the culture of the team. Business analyst who design mock ups can write BDD tests using codeception and add assertions e.g. in codeception test they can be I-> see ("expected Label") I-> don’t see ("unexpected label"). There are inbuilt functions in the framework. Developers following this model can have clearer visibility of new labels they need to add and also the exact warning and error messages .Testers can then automate these tests and passing them can prove that features have been delivered fine and all acceptance criteria have been met.