SlideShare una empresa de Scribd logo
1 de 9
magentys_logo_2014.jpg
BDD Master Class
WHAT
 Behavioural Driven Development (BDD) is a design process in software
engineering where you focus on the behaviour of a feature/application. So
instead of writing tests you should think of specifying behaviour.
 BDD is Test Driven Development done with a specific mindset; testing the
intent of the system rather than testing a particular piece of code. The
difference is subtle but the effects are large.
 BDD means examples (or scenarios) are written *before* the implementation
of the software and happens iteratively, in collaboration with non-technical
stakeholders
 Automated acceptance tests are a by-product of BDD
Traditional
Requirements
Analysis
Design
Code
Test
If Testing shows the
requirement has not
been met then the time
has been lost
Feedback loop takes
time as code is
deployed and devs
wait for test results
Only when code is
written is it identified
that it can’t meet the
design
BDD (Behavioural Driven Development)
Requirements
Analysis
Design
Code
Test
Feedback loop is
continuous and
happens throughout
each cycle
Deliver incremental
changes into
production quicker for
faster results
Team collaboration
up front removes
Chinese whispers
Collaborate
WHY
Lets use the “5 Whys” technique to help understand why we use BDD
Q1. Why would we use BDD?
A1. To get a better quality product
Q2. Why?
A2. Because we (often) get it wrong
Q3. Why?
A3. Because there are misunderstandings, ambiguities or errors in what has been specified
and/or what we eventually get in the form of the product
Q4. Why?
A4. Because the traditional methods for specifying behaviour are not always effective in
capturing
Q5. Why?
A5. Because they fail to use concrete examples and a ubiquitous language
THE PROBLEMS WITH BDD
 It is NOT a silver bullet, but is often perceived as one
 In reality, it is about design and has nothing to do with test automation, but is often
thought of as a test only activity, which means it will FAIL. It is a TEAM activity and
requires a high performing, collaborative and technical one, to be a success.
 It does not negate the need for testing. In fact, it means exploratory testing is
essential, as we should aim to capture 80% of scenarios before we develop. We
are agile and accept that things change and aim to document system behaviour not
tests.
 There can be a disconnect between the features and scenarios captured and what
they become upon implementation. This is a technical problem which can be
solved with good business process and there will be technology that can solve this
 Only one of these problems (the last one) is a REAL problem with BDD. The
rest are team based problems which can be easily solved.
COMMON BDD MISTAKES
 The most common mistake is tying the scenarios (or acceptance criteria) too closely to the
implementation. This is the difference between using Declarative and Imperative language.
An Imperative example:
Given I am on the log in page
When I enter user name “Hamish” and password “pa55w0rd”
And I click the log in button
Then I will be logged in
Why is this example bad?
1. It has made a number of assumptions (more likely) or prescriptions (even worse) about what the
system should appear like, when really the intent or behaviour is to just validly log in
 It assumes or prescribes a log in page
 It assumes or prescribes a user name and a password field is required
 It assumes or prescribes a button to log in is required
 This dictates to technical teams how the feature should be implemented and will probably
mean that when it is built the feature, step definition and page object code will all need to
be refactored
COMMON BDD MISTAKES
A Declarative example:
Given I have logged in to the demo application with valid credentials
Then I should see the demo application welcome message
Why is this example better?
1. It specifies the intent or behaviour without tying it to the implementation
 This means that technical teams can implement this however they choose, as long as they ‘log in’ and
see a welcome message -> SO TEAMS ARE FREE TO USE THEIR CREATIVITY -> TEAMS ARE
HAPPIER
 It means if the implementation changes less refactoring is required. The feature files and step definitions
are unlikely to change, however, the page object may change. For example, if we go from a user name
and password required, to windows authentication with no user name and password, then this scenario
is still valid, however, the previous one is not
1. It is smaller, more succinct and uses more eloquent language
COMMON BDD MISTAKES
 The second most common problem (I see) is writing ambiguous scenarios or ones which use
inconsistent grammar
 A real life example:
When I edit additional details like Authorised
And I can update the corporate client record
Then I can find the corporate client record when I search
Why is this example bad?
1. The "When" steps use "I can", which imply that the user can do something rather than does do
something. A "When" should be an action not an intention, which is either granular, or at a higher
level.
2. The "Then” steps use "I am" or "I can". This often leads to questioning of the result or
ambiguities. Using "should" means a contractual obligation and tends to lead to less
questioning. It marks the sentence, or expected result, as a requirement, which of course, in
agile, can of course be negotiated, but it is a starting point for discussion.

Más contenido relacionado

La actualidad más candente

The WHY behind TDD/BDD and the HOW with RSpec
The WHY behind TDD/BDD and the HOW with RSpecThe WHY behind TDD/BDD and the HOW with RSpec
The WHY behind TDD/BDD and the HOW with RSpecBen Mabey
 
10 Faulty Behaviors of Code Review - Developer Summit Istanbul 2018
10 Faulty Behaviors of Code Review - Developer Summit Istanbul 201810 Faulty Behaviors of Code Review - Developer Summit Istanbul 2018
10 Faulty Behaviors of Code Review - Developer Summit Istanbul 2018Lemi Orhan Ergin
 
Vesterli worst adf_project_ever_wildcard_2013
Vesterli worst adf_project_ever_wildcard_2013Vesterli worst adf_project_ever_wildcard_2013
Vesterli worst adf_project_ever_wildcard_2013Andrejs Vorobjovs
 
Test driven-development
Test driven-developmentTest driven-development
Test driven-developmentDavid Paluy
 
Agile Testing Framework - The Art of Automated Testing
Agile Testing Framework - The Art of Automated TestingAgile Testing Framework - The Art of Automated Testing
Agile Testing Framework - The Art of Automated TestingDimitri Ponomareff
 
Writing Test Cases From User Stories And Acceptance Criteria
Writing Test Cases From User Stories And Acceptance CriteriaWriting Test Cases From User Stories And Acceptance Criteria
Writing Test Cases From User Stories And Acceptance CriteriaHoa Le
 
Making the Unstable Stable - An Intro To Testing
Making the Unstable Stable - An Intro To TestingMaking the Unstable Stable - An Intro To Testing
Making the Unstable Stable - An Intro To TestingCameron Presley
 
Modeling Requirements Narrated2
Modeling Requirements Narrated2Modeling Requirements Narrated2
Modeling Requirements Narrated2Daniel Brookshier
 
Modeling Requirements with SysML
Modeling Requirements with SysML Modeling Requirements with SysML
Modeling Requirements with SysML Daniel Brookshier
 
Fighting with Waste Driven Development - XP Days Ukraine 2017
Fighting with Waste Driven Development - XP Days Ukraine 2017Fighting with Waste Driven Development - XP Days Ukraine 2017
Fighting with Waste Driven Development - XP Days Ukraine 2017Lemi Orhan Ergin
 
Approaching ATDD/BDD
Approaching ATDD/BDDApproaching ATDD/BDD
Approaching ATDD/BDDDhaval Dalal
 
Jason Olson - Test What You've Built
Jason Olson - Test What You've BuiltJason Olson - Test What You've Built
Jason Olson - Test What You've BuiltJohn Zozzaro
 
assertYourself - Breaking the Theories and Assumptions of Unit Testing in Flex
assertYourself - Breaking the Theories and Assumptions of Unit Testing in FlexassertYourself - Breaking the Theories and Assumptions of Unit Testing in Flex
assertYourself - Breaking the Theories and Assumptions of Unit Testing in Flexmichael.labriola
 
Automation testing in Agile project
Automation testing in Agile projectAutomation testing in Agile project
Automation testing in Agile projectHien Nguyen
 
TDD That Was Easy!
TDD   That Was Easy!TDD   That Was Easy!
TDD That Was Easy!Kaizenko
 

La actualidad más candente (20)

Life of a Tester v1
Life of a Tester v1Life of a Tester v1
Life of a Tester v1
 
Getting Started With Testing
Getting Started With TestingGetting Started With Testing
Getting Started With Testing
 
The WHY behind TDD/BDD and the HOW with RSpec
The WHY behind TDD/BDD and the HOW with RSpecThe WHY behind TDD/BDD and the HOW with RSpec
The WHY behind TDD/BDD and the HOW with RSpec
 
10 Faulty Behaviors of Code Review - Developer Summit Istanbul 2018
10 Faulty Behaviors of Code Review - Developer Summit Istanbul 201810 Faulty Behaviors of Code Review - Developer Summit Istanbul 2018
10 Faulty Behaviors of Code Review - Developer Summit Istanbul 2018
 
Vesterli worst adf_project_ever_wildcard_2013
Vesterli worst adf_project_ever_wildcard_2013Vesterli worst adf_project_ever_wildcard_2013
Vesterli worst adf_project_ever_wildcard_2013
 
Test driven-development
Test driven-developmentTest driven-development
Test driven-development
 
Agile Testing Framework - The Art of Automated Testing
Agile Testing Framework - The Art of Automated TestingAgile Testing Framework - The Art of Automated Testing
Agile Testing Framework - The Art of Automated Testing
 
Writing Test Cases From User Stories And Acceptance Criteria
Writing Test Cases From User Stories And Acceptance CriteriaWriting Test Cases From User Stories And Acceptance Criteria
Writing Test Cases From User Stories And Acceptance Criteria
 
Best pratice
Best praticeBest pratice
Best pratice
 
Making the Unstable Stable - An Intro To Testing
Making the Unstable Stable - An Intro To TestingMaking the Unstable Stable - An Intro To Testing
Making the Unstable Stable - An Intro To Testing
 
Modeling Requirements Narrated2
Modeling Requirements Narrated2Modeling Requirements Narrated2
Modeling Requirements Narrated2
 
Modeling Requirements with SysML
Modeling Requirements with SysML Modeling Requirements with SysML
Modeling Requirements with SysML
 
Fighting with Waste Driven Development - XP Days Ukraine 2017
Fighting with Waste Driven Development - XP Days Ukraine 2017Fighting with Waste Driven Development - XP Days Ukraine 2017
Fighting with Waste Driven Development - XP Days Ukraine 2017
 
Put to the Test
Put to the TestPut to the Test
Put to the Test
 
Approaching ATDD/BDD
Approaching ATDD/BDDApproaching ATDD/BDD
Approaching ATDD/BDD
 
Jason Olson - Test What You've Built
Jason Olson - Test What You've BuiltJason Olson - Test What You've Built
Jason Olson - Test What You've Built
 
assertYourself - Breaking the Theories and Assumptions of Unit Testing in Flex
assertYourself - Breaking the Theories and Assumptions of Unit Testing in FlexassertYourself - Breaking the Theories and Assumptions of Unit Testing in Flex
assertYourself - Breaking the Theories and Assumptions of Unit Testing in Flex
 
Automation testing in Agile project
Automation testing in Agile projectAutomation testing in Agile project
Automation testing in Agile project
 
TDD That Was Easy!
TDD   That Was Easy!TDD   That Was Easy!
TDD That Was Easy!
 
Test Automation Pyramid
Test Automation PyramidTest Automation Pyramid
Test Automation Pyramid
 

Similar a Bdd masterclass

Test-Driven Development
Test-Driven DevelopmentTest-Driven Development
Test-Driven Developmentadrianmitev
 
Wednesday Webinar on "Strengthening your Agility with BDD - A demo using Cucu...
Wednesday Webinar on "Strengthening your Agility with BDD - A demo using Cucu...Wednesday Webinar on "Strengthening your Agility with BDD - A demo using Cucu...
Wednesday Webinar on "Strengthening your Agility with BDD - A demo using Cucu...Agile Testing Alliance
 
The principles of agile development
The principles of agile developmentThe principles of agile development
The principles of agile developmentRajat Samal
 
DevOps - Continuous Integration, Continuous Delivery - let's talk
DevOps - Continuous Integration, Continuous Delivery - let's talkDevOps - Continuous Integration, Continuous Delivery - let's talk
DevOps - Continuous Integration, Continuous Delivery - let's talkD Z
 
Case studies of Test Driven Development
Case studies of Test Driven DevelopmentCase studies of Test Driven Development
Case studies of Test Driven DevelopmentSimform
 
Test-Driven Developments are Inefficient; Behavior-Driven Developments are a ...
Test-Driven Developments are Inefficient; Behavior-Driven Developments are a ...Test-Driven Developments are Inefficient; Behavior-Driven Developments are a ...
Test-Driven Developments are Inefficient; Behavior-Driven Developments are a ...Abdelkrim Boujraf
 
179 black-box-software-testing-copyright-2003-cem-kaner1652
179 black-box-software-testing-copyright-2003-cem-kaner1652179 black-box-software-testing-copyright-2003-cem-kaner1652
179 black-box-software-testing-copyright-2003-cem-kaner1652ngothanhtungth
 
Software Development Standard Operating Procedure
Software Development Standard Operating Procedure Software Development Standard Operating Procedure
Software Development Standard Operating Procedure rupeshchanchal
 
Topic tdd-and-bdd b4usolution
Topic tdd-and-bdd b4usolutionTopic tdd-and-bdd b4usolution
Topic tdd-and-bdd b4usolutionHoa Le
 
PHPConf.asia 2016 - BDD with Behat for Beginners
PHPConf.asia 2016 - BDD with Behat for BeginnersPHPConf.asia 2016 - BDD with Behat for Beginners
PHPConf.asia 2016 - BDD with Behat for BeginnersAdam Englander
 
Portal Deployment Best Practices | IBM Portal Excellence Conference 2009
Portal Deployment Best Practices | IBM Portal Excellence Conference 2009Portal Deployment Best Practices | IBM Portal Excellence Conference 2009
Portal Deployment Best Practices | IBM Portal Excellence Conference 2009Perficient, Inc.
 
BEHAVIOR-DRIVEN-DEVELOPMENT.pptx
BEHAVIOR-DRIVEN-DEVELOPMENT.pptxBEHAVIOR-DRIVEN-DEVELOPMENT.pptx
BEHAVIOR-DRIVEN-DEVELOPMENT.pptxCharleneMaedeleon2
 
Test-Driven Developments are Inefficient; Behavior-Driven Developments are a ...
Test-Driven Developments are Inefficient; Behavior-Driven Developments are a ...Test-Driven Developments are Inefficient; Behavior-Driven Developments are a ...
Test-Driven Developments are Inefficient; Behavior-Driven Developments are a ...Abdelkrim Boujraf
 
Markus Clermont - Surviving in an Agile Environment - Google - SoftTest Ireland
Markus Clermont - Surviving in an Agile Environment - Google - SoftTest IrelandMarkus Clermont - Surviving in an Agile Environment - Google - SoftTest Ireland
Markus Clermont - Surviving in an Agile Environment - Google - SoftTest IrelandDavid O'Dowd
 
Test Driven Development (TDD) Preso 360|Flex 2010
Test Driven Development (TDD) Preso 360|Flex 2010Test Driven Development (TDD) Preso 360|Flex 2010
Test Driven Development (TDD) Preso 360|Flex 2010guest5639fa9
 
Test Driven Development (TDD) with FlexUnit 4 - 360|Flex San Jose preso
Test Driven Development (TDD) with FlexUnit 4 - 360|Flex San Jose presoTest Driven Development (TDD) with FlexUnit 4 - 360|Flex San Jose preso
Test Driven Development (TDD) with FlexUnit 4 - 360|Flex San Jose presoElad Elrom
 
Behavior Driven Development—A Guide to Agile Practices by Josh Eastman
Behavior Driven Development—A Guide to Agile Practices by Josh EastmanBehavior Driven Development—A Guide to Agile Practices by Josh Eastman
Behavior Driven Development—A Guide to Agile Practices by Josh EastmanQA or the Highway
 
Code Review
Code ReviewCode Review
Code ReviewRavi Raj
 
Zend con 2016 bdd with behat for beginners
Zend con 2016   bdd with behat for beginnersZend con 2016   bdd with behat for beginners
Zend con 2016 bdd with behat for beginnersAdam Englander
 

Similar a Bdd masterclass (20)

Test-Driven Development
Test-Driven DevelopmentTest-Driven Development
Test-Driven Development
 
Wednesday Webinar on "Strengthening your Agility with BDD - A demo using Cucu...
Wednesday Webinar on "Strengthening your Agility with BDD - A demo using Cucu...Wednesday Webinar on "Strengthening your Agility with BDD - A demo using Cucu...
Wednesday Webinar on "Strengthening your Agility with BDD - A demo using Cucu...
 
The principles of agile development
The principles of agile developmentThe principles of agile development
The principles of agile development
 
DevOps - Continuous Integration, Continuous Delivery - let's talk
DevOps - Continuous Integration, Continuous Delivery - let's talkDevOps - Continuous Integration, Continuous Delivery - let's talk
DevOps - Continuous Integration, Continuous Delivery - let's talk
 
Case studies of Test Driven Development
Case studies of Test Driven DevelopmentCase studies of Test Driven Development
Case studies of Test Driven Development
 
Test-Driven Developments are Inefficient; Behavior-Driven Developments are a ...
Test-Driven Developments are Inefficient; Behavior-Driven Developments are a ...Test-Driven Developments are Inefficient; Behavior-Driven Developments are a ...
Test-Driven Developments are Inefficient; Behavior-Driven Developments are a ...
 
179 black-box-software-testing-copyright-2003-cem-kaner1652
179 black-box-software-testing-copyright-2003-cem-kaner1652179 black-box-software-testing-copyright-2003-cem-kaner1652
179 black-box-software-testing-copyright-2003-cem-kaner1652
 
Software Development Standard Operating Procedure
Software Development Standard Operating Procedure Software Development Standard Operating Procedure
Software Development Standard Operating Procedure
 
Topic tdd-and-bdd b4usolution
Topic tdd-and-bdd b4usolutionTopic tdd-and-bdd b4usolution
Topic tdd-and-bdd b4usolution
 
PHPConf.asia 2016 - BDD with Behat for Beginners
PHPConf.asia 2016 - BDD with Behat for BeginnersPHPConf.asia 2016 - BDD with Behat for Beginners
PHPConf.asia 2016 - BDD with Behat for Beginners
 
Portal Deployment Best Practices | IBM Portal Excellence Conference 2009
Portal Deployment Best Practices | IBM Portal Excellence Conference 2009Portal Deployment Best Practices | IBM Portal Excellence Conference 2009
Portal Deployment Best Practices | IBM Portal Excellence Conference 2009
 
BEHAVIOR-DRIVEN-DEVELOPMENT.pptx
BEHAVIOR-DRIVEN-DEVELOPMENT.pptxBEHAVIOR-DRIVEN-DEVELOPMENT.pptx
BEHAVIOR-DRIVEN-DEVELOPMENT.pptx
 
Test-Driven Developments are Inefficient; Behavior-Driven Developments are a ...
Test-Driven Developments are Inefficient; Behavior-Driven Developments are a ...Test-Driven Developments are Inefficient; Behavior-Driven Developments are a ...
Test-Driven Developments are Inefficient; Behavior-Driven Developments are a ...
 
Markus Clermont - Surviving in an Agile Environment - Google - SoftTest Ireland
Markus Clermont - Surviving in an Agile Environment - Google - SoftTest IrelandMarkus Clermont - Surviving in an Agile Environment - Google - SoftTest Ireland
Markus Clermont - Surviving in an Agile Environment - Google - SoftTest Ireland
 
Tdd
TddTdd
Tdd
 
Test Driven Development (TDD) Preso 360|Flex 2010
Test Driven Development (TDD) Preso 360|Flex 2010Test Driven Development (TDD) Preso 360|Flex 2010
Test Driven Development (TDD) Preso 360|Flex 2010
 
Test Driven Development (TDD) with FlexUnit 4 - 360|Flex San Jose preso
Test Driven Development (TDD) with FlexUnit 4 - 360|Flex San Jose presoTest Driven Development (TDD) with FlexUnit 4 - 360|Flex San Jose preso
Test Driven Development (TDD) with FlexUnit 4 - 360|Flex San Jose preso
 
Behavior Driven Development—A Guide to Agile Practices by Josh Eastman
Behavior Driven Development—A Guide to Agile Practices by Josh EastmanBehavior Driven Development—A Guide to Agile Practices by Josh Eastman
Behavior Driven Development—A Guide to Agile Practices by Josh Eastman
 
Code Review
Code ReviewCode Review
Code Review
 
Zend con 2016 bdd with behat for beginners
Zend con 2016   bdd with behat for beginnersZend con 2016   bdd with behat for beginners
Zend con 2016 bdd with behat for beginners
 

Más de MagenTys

Can you work agile in a waterfall organisation? Wagile
Can you work agile in a waterfall organisation? Wagile  Can you work agile in a waterfall organisation? Wagile
Can you work agile in a waterfall organisation? Wagile MagenTys
 
Agile for CIOs
Agile for CIOsAgile for CIOs
Agile for CIOsMagenTys
 
2 speed IT and how to get there
2 speed IT and how to get there2 speed IT and how to get there
2 speed IT and how to get thereMagenTys
 
BDD - Collaboration & Hands-on practices
BDD - Collaboration & Hands-on practicesBDD - Collaboration & Hands-on practices
BDD - Collaboration & Hands-on practicesMagenTys
 
Product Vs Craft
Product Vs CraftProduct Vs Craft
Product Vs CraftMagenTys
 
Culture Before Tools or Does Tooling Foster Culture?
Culture Before Tools or Does Tooling Foster Culture?Culture Before Tools or Does Tooling Foster Culture?
Culture Before Tools or Does Tooling Foster Culture?MagenTys
 
Zero to tested
Zero to testedZero to tested
Zero to testedMagenTys
 
How Retail Store Design Enhances Customer Experience
 How Retail Store Design Enhances Customer Experience How Retail Store Design Enhances Customer Experience
How Retail Store Design Enhances Customer ExperienceMagenTys
 
The Blurring Line Between Online and Offline Commerce Experiences
The Blurring Line Between Online and Offline Commerce ExperiencesThe Blurring Line Between Online and Offline Commerce Experiences
The Blurring Line Between Online and Offline Commerce ExperiencesMagenTys
 
Ed Oughton 2015 digital communications for a digital economy
Ed Oughton 2015 digital communications for a digital economyEd Oughton 2015 digital communications for a digital economy
Ed Oughton 2015 digital communications for a digital economyMagenTys
 
Cambridge meetup
Cambridge meetupCambridge meetup
Cambridge meetupMagenTys
 
Transforming Legacy In To The New World Of DevOps and PaaS
Transforming Legacy In To The New World Of DevOps and PaaSTransforming Legacy In To The New World Of DevOps and PaaS
Transforming Legacy In To The New World Of DevOps and PaaSMagenTys
 
John Muir presentation
John Muir presentationJohn Muir presentation
John Muir presentationMagenTys
 
Alex Sbardella presentation
Alex Sbardella presentationAlex Sbardella presentation
Alex Sbardella presentationMagenTys
 
Craig Smith presentation
Craig Smith presentationCraig Smith presentation
Craig Smith presentationMagenTys
 

Más de MagenTys (15)

Can you work agile in a waterfall organisation? Wagile
Can you work agile in a waterfall organisation? Wagile  Can you work agile in a waterfall organisation? Wagile
Can you work agile in a waterfall organisation? Wagile
 
Agile for CIOs
Agile for CIOsAgile for CIOs
Agile for CIOs
 
2 speed IT and how to get there
2 speed IT and how to get there2 speed IT and how to get there
2 speed IT and how to get there
 
BDD - Collaboration & Hands-on practices
BDD - Collaboration & Hands-on practicesBDD - Collaboration & Hands-on practices
BDD - Collaboration & Hands-on practices
 
Product Vs Craft
Product Vs CraftProduct Vs Craft
Product Vs Craft
 
Culture Before Tools or Does Tooling Foster Culture?
Culture Before Tools or Does Tooling Foster Culture?Culture Before Tools or Does Tooling Foster Culture?
Culture Before Tools or Does Tooling Foster Culture?
 
Zero to tested
Zero to testedZero to tested
Zero to tested
 
How Retail Store Design Enhances Customer Experience
 How Retail Store Design Enhances Customer Experience How Retail Store Design Enhances Customer Experience
How Retail Store Design Enhances Customer Experience
 
The Blurring Line Between Online and Offline Commerce Experiences
The Blurring Line Between Online and Offline Commerce ExperiencesThe Blurring Line Between Online and Offline Commerce Experiences
The Blurring Line Between Online and Offline Commerce Experiences
 
Ed Oughton 2015 digital communications for a digital economy
Ed Oughton 2015 digital communications for a digital economyEd Oughton 2015 digital communications for a digital economy
Ed Oughton 2015 digital communications for a digital economy
 
Cambridge meetup
Cambridge meetupCambridge meetup
Cambridge meetup
 
Transforming Legacy In To The New World Of DevOps and PaaS
Transforming Legacy In To The New World Of DevOps and PaaSTransforming Legacy In To The New World Of DevOps and PaaS
Transforming Legacy In To The New World Of DevOps and PaaS
 
John Muir presentation
John Muir presentationJohn Muir presentation
John Muir presentation
 
Alex Sbardella presentation
Alex Sbardella presentationAlex Sbardella presentation
Alex Sbardella presentation
 
Craig Smith presentation
Craig Smith presentationCraig Smith presentation
Craig Smith presentation
 

Último

presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024The Digital Insurer
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusZilliz
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Zilliz
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfOverkill Security
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 

Último (20)

presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 

Bdd masterclass

  • 2. WHAT  Behavioural Driven Development (BDD) is a design process in software engineering where you focus on the behaviour of a feature/application. So instead of writing tests you should think of specifying behaviour.  BDD is Test Driven Development done with a specific mindset; testing the intent of the system rather than testing a particular piece of code. The difference is subtle but the effects are large.  BDD means examples (or scenarios) are written *before* the implementation of the software and happens iteratively, in collaboration with non-technical stakeholders  Automated acceptance tests are a by-product of BDD
  • 3. Traditional Requirements Analysis Design Code Test If Testing shows the requirement has not been met then the time has been lost Feedback loop takes time as code is deployed and devs wait for test results Only when code is written is it identified that it can’t meet the design
  • 4. BDD (Behavioural Driven Development) Requirements Analysis Design Code Test Feedback loop is continuous and happens throughout each cycle Deliver incremental changes into production quicker for faster results Team collaboration up front removes Chinese whispers Collaborate
  • 5. WHY Lets use the “5 Whys” technique to help understand why we use BDD Q1. Why would we use BDD? A1. To get a better quality product Q2. Why? A2. Because we (often) get it wrong Q3. Why? A3. Because there are misunderstandings, ambiguities or errors in what has been specified and/or what we eventually get in the form of the product Q4. Why? A4. Because the traditional methods for specifying behaviour are not always effective in capturing Q5. Why? A5. Because they fail to use concrete examples and a ubiquitous language
  • 6. THE PROBLEMS WITH BDD  It is NOT a silver bullet, but is often perceived as one  In reality, it is about design and has nothing to do with test automation, but is often thought of as a test only activity, which means it will FAIL. It is a TEAM activity and requires a high performing, collaborative and technical one, to be a success.  It does not negate the need for testing. In fact, it means exploratory testing is essential, as we should aim to capture 80% of scenarios before we develop. We are agile and accept that things change and aim to document system behaviour not tests.  There can be a disconnect between the features and scenarios captured and what they become upon implementation. This is a technical problem which can be solved with good business process and there will be technology that can solve this  Only one of these problems (the last one) is a REAL problem with BDD. The rest are team based problems which can be easily solved.
  • 7. COMMON BDD MISTAKES  The most common mistake is tying the scenarios (or acceptance criteria) too closely to the implementation. This is the difference between using Declarative and Imperative language. An Imperative example: Given I am on the log in page When I enter user name “Hamish” and password “pa55w0rd” And I click the log in button Then I will be logged in Why is this example bad? 1. It has made a number of assumptions (more likely) or prescriptions (even worse) about what the system should appear like, when really the intent or behaviour is to just validly log in  It assumes or prescribes a log in page  It assumes or prescribes a user name and a password field is required  It assumes or prescribes a button to log in is required  This dictates to technical teams how the feature should be implemented and will probably mean that when it is built the feature, step definition and page object code will all need to be refactored
  • 8. COMMON BDD MISTAKES A Declarative example: Given I have logged in to the demo application with valid credentials Then I should see the demo application welcome message Why is this example better? 1. It specifies the intent or behaviour without tying it to the implementation  This means that technical teams can implement this however they choose, as long as they ‘log in’ and see a welcome message -> SO TEAMS ARE FREE TO USE THEIR CREATIVITY -> TEAMS ARE HAPPIER  It means if the implementation changes less refactoring is required. The feature files and step definitions are unlikely to change, however, the page object may change. For example, if we go from a user name and password required, to windows authentication with no user name and password, then this scenario is still valid, however, the previous one is not 1. It is smaller, more succinct and uses more eloquent language
  • 9. COMMON BDD MISTAKES  The second most common problem (I see) is writing ambiguous scenarios or ones which use inconsistent grammar  A real life example: When I edit additional details like Authorised And I can update the corporate client record Then I can find the corporate client record when I search Why is this example bad? 1. The "When" steps use "I can", which imply that the user can do something rather than does do something. A "When" should be an action not an intention, which is either granular, or at a higher level. 2. The "Then” steps use "I am" or "I can". This often leads to questioning of the result or ambiguities. Using "should" means a contractual obligation and tends to lead to less questioning. It marks the sentence, or expected result, as a requirement, which of course, in agile, can of course be negotiated, but it is a starting point for discussion.

Notas del editor

  1. Feedback loop is too long have to code and deploy prior to finding results