CSC/ECE 517 Fall 2012/ch1b 1w69 mv

From Expertiza_Wiki
Revision as of 00:18, 27 September 2012 by Mstonse (talk | contribs) (→‎Format)
Jump to navigation Jump to search

Introduction to Behavior-Driven Design and User Stories

Behaviour Driven Design is a software development methodology which involves incorporating stakeholder’s point of view in the development of the software. The software is implemented by taking into consideration its behaviour as described by its stakeholders.

Need for BDD

BDD comes under agile development. Agile development came into picture to overcome the reasons for software project failure.Some of the reasons for software project failure are:

  • Lack of understanding of user requirements.
  • Changing requirements
  • Pressure to meet the project deadline.
  • Budget and time constraints
  • Difficulty in software development and management
  • Miscommunication or lack of communication between stakeholders.

Agile development involves stakeholder participation throughout the lifetown of the product. BDD helps achieve this objective of agile development.User stories are written in BDD to describe the feature that is to be implemented.User stories can then be used to write tests to check the behaviour desired by the stakeholder.TDD approach can then be used to implement the system.

Understanding BDD

In order to reduce miscommunication and increase stakeholder participation, BDD asks questions about behaviour of application before and during development. To communicate effectively with people, it is necessary to use plain english language so that regular non- technical people can express and understand their requirements clearly.This is achieved by using user stories.The feature identified from the interaction with the customer is represented in 1-3 sentences in everyday language in a user story. In most of the cases user stories are written on “ 3x5 “ index cards. The advantage of using “3x5“ cards is that all the stakeholders can give their opinions without being intimidated.This involves all the customers in the brainstorming session. The compact size of the card allows stakeholders to prioritize the features and change them as required during development.Release dates can also be associated with the cards.

Format

The generally accepted format for user stories is as follows: As a [role] So that [goal] I want to [task]

Consider a video sharing website where users can upload, stream or download movies.One of the features of this site is that user can upload a movie. The user story for this feature is shown in fig () After identifying user stories we have to describe scenario.Scenario uses a sequence of steps that describe how the user expects the system to behave.

The format for describing a scenario is as follows:

 Given[situation]
 When [action]
 Then [expected result]

For the movie uploading user story described above, the scenario is as follows:

Given[A movie file]
When the user uploads the file
Then the movie gets added to the RottenPotatoes database and appears in the list of movies.