BDD is a software engineering process based on Test-driven Development (TDD). Martin Fowler explains TDD on the following URL:
http://martinfowler.com/bliki/TestDrivenDevelopment.html
BDD combines the best practices of TDD, Domain-driven Development (DDD), and Object Oriented Programming (OOPs). You can learn about DDD on the following URL:
http://martinfowler.com/tags/domain%20driven%20design.html
In an agile team, scoping a feature is a mammoth task; the business stakeholders talk about business interests and the development team talks about technical challenges. BDD provides a universal language that allows useful communication and feedback between the stakeholders.
Agile methodologies include Scrum, Lean, Kanban, XP, and so on. Agile methodologies believe in self-organized teams. You can get more information about agile development on the following URL:
http://www.versionone.com/Agile101/Agile-Development-Methodologies-Scrum-Kanban-Lean-XP/
Dan North developed BDD and created the JBehave framework for BDD. He defines BDD as follows:
"Behavior-driven Development is about implementing an application by describing it from the point of view of its stakeholders."
He proposed the following best practices:
Given [initial context], when [event occurs], then [ensure some outcomes]
A user story describes a testable requirement, and a scenario defines the completeness or acceptance criteria of a story.
Let us write a user story for our stock broker simulation:
The following is a scenario example:
Mockito supports the BDD style of writing tests, using the given-when-then syntax.
3.139.240.244