Professional Documents
Culture Documents
BDD Sample Example
BDD Sample Example
BDD is Behaviour driven development, suppose you have a test case like when user
enters user name, password then click on the . login button then user should get
login successfully.
so if you want to automate above test case then you would write code to:
launch a browser
enter the user name in the username field
then code for entering the password
and at last the code for click on the login button
so all this is a code if you show your code to BA, a client they won't understand
it
as BA and client or any non-technical persona would have very less knowledge about
the code. so here the BDD comes in picture
AND password
and each line will have a method associated with it like user enters username..so
this will have a method which will enter the username same with a password, login
button
so the benefit here is if you show this BDD script to BA, Client or any non-
technical person he would understand it as this is written in plain English
language.
this way you have to write your scripts for all the use cases/test cases and this
also serves a purpose of documents.