SlideShare a Scribd company logo
S C E N A R I O
www.nfq.com
eBusiness Development
DIVING INTO BDD: HOW WE DO IT
I N O R D E R T O
•To exchange knowledge
•To share our best practices
AS A PRESENTERS
•Darius Kasperavičius
•Karolis Daužickas
•Irmantas Zenkus
•To do the presentation
W E WA N T T O
•And to know you
T E S T I N G
• TESTS REDUCE BUGS
• TESTS ARE GOOD DOCUMENTATION
• TESTS ALLOW SAFE REFACTORING
TESTS
• REDUCE THE COST OF CHANGE
• TESTING FORCES YOU TO THINK
A G I L E T E S T I N G Q U A D R A N T
Q1
Q2 Q3
Q4
B D D
BDD (Behaviour Driven Development) is a
synthesis and refinement of practices stemming
from TDD (Test Driven Development) and ATDD
(Acceptance Test Driven Development).
B D D P R O S
• Driven by bussiness value (outside-in)
• Requirements and tests are in natural
language
• Adds structrure to TDD
• Collaboration between team members
BDD WORKFLOW
• Think and describe a feature
• Red, green, yellow
• Write a failing test
• Write a small amount of production code
• Refactor
• Write a Unit tests along the way
OUTSIDE - IN
BDD
Customer Requirements
Customer Requirements
Customer Requirements
Customer Requirements
TDD
BDD
Humanshavebeentellingstoriesforthousandsofyears.
S T O R Y
Story in BDD helps ensuring that development
team has understanding of business on the same
level that client does
Simplicity is the ultimate sophistication
1. For who?
2. What?
3. How?
R O L E S
By specifying the role within the narrative, you
know who to talk to about the feature
B D D I N
BDD in my team: how we do it
S C H E M A
Foxrate
Application
Foxrate API Foxrate AKZ Plugins
Builds SDK
Tests SDK
Builds Modules
(FI)Runs tests
Deploys to markets
BDD in my team: how we do it
B E H A T
Behat is an open source behavior-driven
development framework for PHP 5.3 and 5.4.
What is behavior-driven development, you ask?
It’s the idea that you start by writing human-
readable sentences that describe a feature of your
application and how it should work, and only then
implement this behavior in software.
We are not testing that application functions as we
(developers) expect it to, but instead we’re testing
that it fullfils clients business needs.
Behat by example by Konstantin Kudryashov
You might think about Behat as a tool to
teach your clients about testing, but in reality
it's a tool to teach you about client
business.
B E H AT I N S TA L AT I O N
"require-dev": {
"behat/behat": "3.*@stable",
"behat/mink-extension": "*”,
"behat/mink": "1.5@stable",
"behat/mink-selenium2-driver": "*",
"behat/common-contexts": "*@dev",
"phpunit/phpunit": "4.*@stable",
"sensiolabs/behat-page-object-extension":
"dev-master",
"ocramius/proxy-manager": "~0.5"
}
composer update
bin/behat --init
B E H A T E X A M P L E
• Gherkin
Narrative
Scenario
Scenario
details
B E H A T E X A M P L E
• Gherkin
Events
Context
Outcome
Benefit
Role
Feature
B E H A T E X A M P L E
• FeatureContext
BEHAT 3: WHAT’S NEW?
• Implements SnippetAcceptingContext
• Turnip mathching (@Given My name is
:name). Regex is still supported.
• Output in code
• Cleaner and more structured output (shows
exactly wher it failed)
• Error out levels
T I P S
U S E M U LT I P L E C O N T E X T S
public function __construct(array $parameters)
{
$this->useContext('subcontext_alias', new AnotherContext());
}
U S E SY M FO N Y 2 E X T E N S I O N
U S E PA G EO B J E C T B U N D L E
ADD SCREENSHOTS
On fails
On visual validation
USE EXTERNAL ASSERTATION TOOL
PhpUnit / PhpSpec
A L T E R N A T I V E S
PhpSpec
JS?
Behat deals to have specifications that
reflects the environment from the
outside.
PHPSpec responds to the behaviour in
the lower level, from the internal of
the classes.
PHPSpec is considered a tool that
helps you to develop.
InternalExternal
B E H A T V S P H P S P E C
Q U E S T I O N S ?
Resources
http://dannorth.net/introducing-bdd/
http://dannorth.net/whats-in-a-story/
http://alistair.cockburn.us/Use+case+fundamentals
http://everzet.com/post/35632192627/great-talk-about-why-newcomers-get-bdd-
wrong
http://dannorth.net/2012/05/31/bdd-is-like-tdd-if/
http://welcometothebundle.com/it-is-all-about-behaviour-also-in-php/
http://welcometothebundle.com/best-resources-about-symfony-tdd-bdd-ddd-
methologies/
http://www.agile-doctor.com/2012/03/06/10-reasons-why-bdd-changes-everything/
https://github.com/Behat/en-mink.behat.org/blob/master/index.rst#find-methods
http://guide.agilealliance.org/guide/bdd.html
http://vimeo.com/43612884
http://welcometothebundle.com/phpunit-vs-phpspec-theory-on-behaviour-driven-
development/
http://elephantintheroom.io/blog/2013/11/episode-5-test-first-after-and-beyond/
https://speakerdeck.com/everzet/behat-by-example
Gojko Adzic Specification by Example: How Successful Teams Deliver the Right
Software
Klausimai
https://github.com/dardarlt/bdd-tools
darius@foxrate.de
irmantas.zenkus@hometogo.de

More Related Content

KEY
Getting Comfortable with BDD
PDF
Implementing DSLs in practice
PDF
Measuring Code Quality in WTF/min.
PDF
BDD in Action - building software that matters
PDF
Breaking Dependencies Legacy Code - Cork Software Crafters - September 2019
PPTX
Importance of the quality of code
PDF
Internal domain-specific languages
PDF
BDD in Action - Automated Web Testing with WebDriver and Serenity
Getting Comfortable with BDD
Implementing DSLs in practice
Measuring Code Quality in WTF/min.
BDD in Action - building software that matters
Breaking Dependencies Legacy Code - Cork Software Crafters - September 2019
Importance of the quality of code
Internal domain-specific languages
BDD in Action - Automated Web Testing with WebDriver and Serenity

Viewers also liked (20)

PPT
Sistem informatika penjualan secara tunaii
PPTX
Globalisation
PDF
CURRICULUM VITAE
PPTX
Succes dan berprestasi
PPTX
Slidesharedeck feb19
PPTX
Topologi ring
DOC
Youtube marketing music
PPTX
行車安全網絡 - Smart Watch
PPTX
Taller1_CaillamaraSergio_Diseño
PPTX
D2d1 ethics in animals.
PPTX
Section a revision
PPTX
Section c revision lesson
PPTX
Sistem pengolah dataa
DOCX
St. katherine scrimmage
PPTX
B1c1 the biological theory of dreaming
PPTX
Modem
PPTX
E3a1 offender profiling
PPTX
E3c3 how a forensic psychologist might help treat
Sistem informatika penjualan secara tunaii
Globalisation
CURRICULUM VITAE
Succes dan berprestasi
Slidesharedeck feb19
Topologi ring
Youtube marketing music
行車安全網絡 - Smart Watch
Taller1_CaillamaraSergio_Diseño
D2d1 ethics in animals.
Section a revision
Section c revision lesson
Sistem pengolah dataa
St. katherine scrimmage
B1c1 the biological theory of dreaming
Modem
E3a1 offender profiling
E3c3 how a forensic psychologist might help treat
Ad

Similar to BDD in my team: how we do it (20)

PDF
TDD and BDD in Sky Deutschland
PPTX
CucumberSeleniumWD
PPT
Introduction to Behavior Driven Development
PPTX
Behaviour Driven Development
PDF
Quick Intro to Clean Coding
PDF
Spec(ing) Out Your Workflow with SpecFlow
PPTX
BDD Primer
PDF
Testing stage. being ahead business with cucumber
PDF
Is BDD Worth It? Considerations for Advanced Test Automation
PDF
Behavior Driven Development—A Guide to Agile Practices by Josh Eastman
PPTX
BDD presentation
PPTX
C:\Fakepath\Combating Software Entropy 2
PPTX
C:\Fakepath\Combating Software Entropy 2
PDF
A journey to_be_a_software_craftsman
PPTX
Behaviour Driven Development V 0.1
PDF
ChatGPT and Beyond - Elevating DevOps Productivity
ODP
2014 11 20 Drupal 7 -> 8 test migratie
PPT
BDD communication bridges - Expedia TED talk
PPTX
Agile Chennai 2021 | Achieving High DevOps Maturity through Platform Engineer...
PPTX
BDD Selenium for Agile Teams - User Stories
TDD and BDD in Sky Deutschland
CucumberSeleniumWD
Introduction to Behavior Driven Development
Behaviour Driven Development
Quick Intro to Clean Coding
Spec(ing) Out Your Workflow with SpecFlow
BDD Primer
Testing stage. being ahead business with cucumber
Is BDD Worth It? Considerations for Advanced Test Automation
Behavior Driven Development—A Guide to Agile Practices by Josh Eastman
BDD presentation
C:\Fakepath\Combating Software Entropy 2
C:\Fakepath\Combating Software Entropy 2
A journey to_be_a_software_craftsman
Behaviour Driven Development V 0.1
ChatGPT and Beyond - Elevating DevOps Productivity
2014 11 20 Drupal 7 -> 8 test migratie
BDD communication bridges - Expedia TED talk
Agile Chennai 2021 | Achieving High DevOps Maturity through Platform Engineer...
BDD Selenium for Agile Teams - User Stories
Ad

Recently uploaded (20)

PPTX
Digital Literacy And Online Safety on internet
PPT
Design_with_Watersergyerge45hrbgre4top (1).ppt
PDF
Unit-1 introduction to cyber security discuss about how to secure a system
PDF
Testing WebRTC applications at scale.pdf
PPTX
Job_Card_System_Styled_lorem_ipsum_.pptx
PDF
Vigrab.top – Online Tool for Downloading and Converting Social Media Videos a...
PPTX
Funds Management Learning Material for Beg
PPTX
INTERNET------BASICS-------UPDATED PPT PRESENTATION
PPTX
Module 1 - Cyber Law and Ethics 101.pptx
PPTX
Introuction about ICD -10 and ICD-11 PPT.pptx
PPTX
international classification of diseases ICD-10 review PPT.pptx
PDF
Tenda Login Guide: Access Your Router in 5 Easy Steps
PPTX
Slides PPTX World Game (s) Eco Economic Epochs.pptx
PPTX
522797556-Unit-2-Temperature-measurement-1-1.pptx
PDF
Triggering QUIC, presented by Geoff Huston at IETF 123
PDF
💰 𝐔𝐊𝐓𝐈 𝐊𝐄𝐌𝐄𝐍𝐀𝐍𝐆𝐀𝐍 𝐊𝐈𝐏𝐄𝐑𝟒𝐃 𝐇𝐀𝐑𝐈 𝐈𝐍𝐈 𝟐𝟎𝟐𝟓 💰
PPTX
Internet___Basics___Styled_ presentation
PPTX
presentation_pfe-universite-molay-seltan.pptx
PDF
The Internet -By the Numbers, Sri Lanka Edition
PDF
WebRTC in SignalWire - troubleshooting media negotiation
Digital Literacy And Online Safety on internet
Design_with_Watersergyerge45hrbgre4top (1).ppt
Unit-1 introduction to cyber security discuss about how to secure a system
Testing WebRTC applications at scale.pdf
Job_Card_System_Styled_lorem_ipsum_.pptx
Vigrab.top – Online Tool for Downloading and Converting Social Media Videos a...
Funds Management Learning Material for Beg
INTERNET------BASICS-------UPDATED PPT PRESENTATION
Module 1 - Cyber Law and Ethics 101.pptx
Introuction about ICD -10 and ICD-11 PPT.pptx
international classification of diseases ICD-10 review PPT.pptx
Tenda Login Guide: Access Your Router in 5 Easy Steps
Slides PPTX World Game (s) Eco Economic Epochs.pptx
522797556-Unit-2-Temperature-measurement-1-1.pptx
Triggering QUIC, presented by Geoff Huston at IETF 123
💰 𝐔𝐊𝐓𝐈 𝐊𝐄𝐌𝐄𝐍𝐀𝐍𝐆𝐀𝐍 𝐊𝐈𝐏𝐄𝐑𝟒𝐃 𝐇𝐀𝐑𝐈 𝐈𝐍𝐈 𝟐𝟎𝟐𝟓 💰
Internet___Basics___Styled_ presentation
presentation_pfe-universite-molay-seltan.pptx
The Internet -By the Numbers, Sri Lanka Edition
WebRTC in SignalWire - troubleshooting media negotiation

BDD in my team: how we do it

Editor's Notes

  • #5: Prasome supratingumo - daugelis is musu viesuose pristatymuose zengiame pirmuosius zingsnius
  • #6: Kas rasote testus Kas naudojate TDD Kas rasote web acceptance testus? Kas naudojate BDD ----- Meeting Notes (08/12/14 15:08) ----- Kas yra Behat?
  • #8: Black Box White Box Unit Integration Functional System Regression Performance Smoke Canary Usability A/B Characterization tests ... A study conducted by Microsoft and IBM showed that writing tests can add 15% – 35% to development time but reduce the number of bugs by 40% – 90%
  • #9: Q2Q3 Validate Q4 Verify Q2q1 For the team Q3Q4 For the Customer Ility - Usability, Maintainability, Scalability, Availability, Extensibility, Security, Portability, ----- Meeting Notes (08/12/14 15:13) ----- Virsuje orientuoti i verslo logika
  • #10: TDD is exclusive to programmer domain We
  • #11: B – tai elgsena BDD - Agile technika, apjungianti ir patobulinanti TDD ir web acceptance testavimo technikas, , skatinanti bendradarbiavimą tarp techninių ir ne techninių darbuotojų.
  • #12: Orientuota I nauda verslui ir vartotojo elgsena Visi reikalavimai rašomi žmonių kalba Suteikia TDD testams struktūrą skatina tikslęsnį užduoties formulavimą įprasta žmogui kalba Skatina supratimą tarp visų organizacijos dalyvių Panaudojant BDD, galime naudoti irankius, su kuriais visas formuluotes galime testuoti automatizuotai
  • #13: ----- Meeting Notes (08/12/14 00:01) ----- Grafiškai pavaizduota sekančioje skaidrėje Rašykite nesikartojančius testus Kaip sakė K. Kudriasiov, Behat kūrėjas, viename šviežiame podcaste - jūsų tikslas yra testuoti pačius svarbiausius dalykus.
  • #14: ----- Meeting Notes (08/12/14 15:52) ----- Dabar noreciau pereiti prie esminiu BDD daliu
  • #15: ----- Meeting Notes (08/12/14 15:52) ----- Apie technine BDD puse as papasakosiu per savo komandos irankiu pristatyma Dabar ape du teorinius BDD elementus: istorija ir roles Jau tukstancius metu zmones pasakoja istorijas. Su istorija jus uztikrinate, kad jusu ir jusu kliento biznio logikos suratimas yra vienodas
  • #16: And even leveling up client knowledge of his business In many many cases, ----- Meeting Notes (08/12/14 15:52) ----- Su istorija jus uztikrinate, kad jusu ir jusu kliento biznio logikos suratimas yra vienodas
  • #18: Feature: registration in order to maintain my shopping history as a site visitor I need to be able to register on this site ----- Meeting Notes (08/12/14 15:52) ----- Kokiu tikslu arba kodel? Ka kaip?
  • #19: Ryan Weaver I think the real difference betw”een mid-level and pro-level Behat users is the understanding of roles and their place in features. ----- Meeting Notes (08/12/14 15:52) ----- Nurodydami role, jus patikslinate, kam si role skirta
  • #20: Feature: registration in order to maintain my shopping history as a site visitor I need to be able to register on this site
  • #21: Behaviour-driven development is an “outside-in” methodology. It starts at the outside by identifying business outcomes, and then drills down into the feature set that will achieve those outcomes Behaviour-driven development (BDD) takes the position that you can turn an idea for a requirement into implemented, tested, production-ready code simply and effectively, as long as the requirement is specific enough that everyone knows what’s going on
  • #23: Kas as Problemos Vizualinis patikirinimas
  • #24: Trumpas Foxrate pristatymas: tai atsiliepimu, ivertini
  • #25: Behat testavimas : Docker / CI / Naujos formos / Moduliai Problemos
  • #26: Component based Engineering vs Legacy ----- Meeting Notes (05/12/14 16:03) ----- Isimtiniais atvejais naudojame BDD
  • #28: uztikrina, kad testuojame butent tai, ko labiausiai reikia kliento verslui
  • #29: padeda JUMS geriau suprasti kliento versla
  • #31: As user? In many cases it’s a visitor!
  • #33: Behat Acceptance testing Test a feature by executing scenarios Mink – controls browser Web acceptance testing
  • #34: the context class is all about how to test your application, and that it actually behaves as expected Mix Contexts!
  • #35: neverta sitos
  • #36: Add screenshots
  • #37: Is esmes K. Kudriashov patarimas butu naudoti atskira konteksta atskiroms rolems.
  • #39: Paslepia visas slikstynes ir leidzia jums bendrauti graziu ir lengvai skaitomu kodu.
  • #43: ----- Meeting Notes (05/12/14 16:03) ----- gal ismesiu