Behavior Driven Development - Live Webinar
-
Upload
belatrixsoftware -
Category
Software
-
view
174 -
download
0
description
Transcript of Behavior Driven Development - Live Webinar
What is BDD?
August 20th, 2014
PANELISTS
Luis RaedSenior Developer
Mauricio BesséProject Leader
BDD
Concept
A new process that helps to manage software development projects efficiently.
TOPICS
• History• Definition• Language example• Implementation example• Benefits• Statistics• Q&A
HISTORY
• Waterfall• Agile
DEFINITION
LANGUAGE EXAMPLE
User Story: As a registered user, I want to login in order to access to Home page. If the username or password are invalid, I will stay in login page and the system will show an error message.
Task: Validate username and password. If they are valid, redirect the user to Home page, otherwise stay in the page and show an error message.
Scenario: Valid loginGiven The user is in Login page And the user enters a valid username
And the user enters a valid passwordWhen the user logs inThen the user is redirected to Home page
GHERKIN
OTHER SCENARIOSScenario: Enter an invalid password Given The user is in Login page And the user enters a valid username
And the user enters an invalid password When the user logs in Then the user is redirected to the Login page And the system shows the following message: "Invalid Username or Password. Please, check the values and try again". Scenario: Enter an invalid username Given The user is in Login page And the user enters an invalid username
And the user enters a valid password When the user logs in Then the user is redirected to the Login page And the system shows the following message: "Invalid Username or Password. Please, check the values and try again". Scenario: Enter an invalid username and an invalid password Given The user is in Login page And the user enters an invalid username
And the user enters an invalid password When the user logs in Then the user is redirected to the Login page And the system shows the following message: "Invalid Username or Password. Please, check the values and try again".
IMPLEMENTATION
Initial stateFirst approachBDD Process
INITIAL STATE
FIRST APPROACH
• Communication• Collaboration• Quality issues• Regression Analysis• Traceability of requirements
BDD PROCESS
ISSUE TRACKER
FAILING SCENARIO
CODING PHASE
1. Write failing unit test2. Write code to make the test pass3. Refactor
PASSING SCENARIOS
REFACTOR CODE
BENEFITS
• Live documentation• Better product understanding• Reduction of communication barriers• Improvement of quality software• Stakeholder’s expectations achieved
LIVE DOCUMENTATIONScenario: Enter an invalid password Given The user is in Login page And the user enter a valid username
And the user enter an invalid password When the user logs in Then the user is redirected to the Login page And the system shows the following message: "Invalid Username or Password. Please, check the values and try again". Scenario: Enter an invalid username Given The user is in Login page And the user enter an invalid username
And the user enter a valid password When the user logs in Then the user is redirected to the Login page And the system shows the following message: "Invalid Username or Password. Please, check the values and try again".
BETTER PRODUCT UNDERSTANDING
REDUCE COMMUNICATION BARRIERS
ENCOURAGE QUALITY SOFTWARE
MATCH STAKEHOLDER EXPECTATIONS
REGRESSION REPORT
STATISTICS
CONCLUSION
1. Increasing the chances of success of the project.2. Improving communication, collaboration and software quality.3. Concentrating on key features for stakeholders.4. Using a common and effective language.