This article solves the following challenge:
Some authors refer to BDD as TDD done right.
BDD follows the same processes as TDD but with the focus on the user. The test written have to fulfill the user story. The idea of creating the tests is that the method behaviour will be clear just by reading the sentence.
BDD follows a language that fits perfect in a agile user story:
Example:
Story - Returns go to stock
In order to keep track of stock
As a store owner I want to add items back to stock when they are returned
BDD tests: Refunded items should be returned to stock
Given a customer previously bought a black sweater from me
And I currently have three black sweaters left in stock
When he returns the sweater for a refund
Then I should have four black sweaters in stock
BDD builds upon TDD. You have technical quality with a business approach.
Evaluate complexity of present statement:
Select ratingCancelGuessingPassing knowledgeKnowledgeableExpert
Your rating: 3 Average: 3 (1 vote)