SlideShare une entreprise Scribd logo
1  sur  43
Télécharger pour lire hors ligne
Behavior Driven Development




                            by Aliaksandr Ikhelis, 2013 @Expedia.com
Sunday, 10 March 13
Agenda

                  •   BDD
                  •   Development workflow
                  •   Testing quadrants (types of tests)
                  •   Testing Pyramid
                  •   Stubbing in Functional Tests
                  •   Continuous Integration



Sunday, 10 March 13
Communication Issue
                        They are   They do not know
                         slow!..   what they need!..




Sunday, 10 March 13
Communication Issue
                        They are   They do not know
                         slow!..   what they need!..




Sunday, 10 March 13
Building communication bridge




Sunday, 10 March 13
Building communication bridge




Sunday, 10 March 13
Behavior Driven Development

                                  BDD is an evolution in the thinking
                                  behind TDD & ATDP



                                Focus on delivery of the
                      prioritized and verifiable business value
                         by providing a common vocabulary




Sunday, 10 March 13
Behavior Driven Development
                       Practices




Sunday, 10 March 13
Behavior Driven Development
                       Practices
                       • Establish goals




Sunday, 10 March 13
Behavior Driven Development
                       Practices
                       • Establish goals

                       • Draw out features using feature injection




Sunday, 10 March 13
Behavior Driven Development
                       Practices
                       • Establish goals

                       • Draw out features using feature injection

                       • Involve stakeholders in the implementation
                         process through outside-in software
                         development




Sunday, 10 March 13
Behavior Driven Development
                       Practices
                       • Establish goals

                       • Draw out features using feature injection

                       • Involve stakeholders in the implementation
                         process through outside-in software
                         development

                       • Use examples to describe behavior




Sunday, 10 March 13
Behavior Driven Development
                       Practices
                       • Establish goals

                       • Draw out features using feature injection

                       • Involve stakeholders in the implementation
                         process through outside-in software
                         development

                       • Use examples to describe behavior

                       • Automate examples to provide quick
                         feedback and regression testing



Sunday, 10 March 13
What BDD adds to TDD




Sunday, 10 March 13
What BDD adds to TDD
                           • Test what an object does instead
                             of what it is




Sunday, 10 March 13
What BDD adds to TDD
                           • Test what an object does instead
                             of what it is

                           • Design top-down, which is essential
                             for YAGNI – You Aren't Gonna Need It




Sunday, 10 March 13
What BDD adds to TDD
                           • Test what an object does instead
                             of what it is

                           • Design top-down, which is essential
                             for YAGNI – You Aren't Gonna Need It

                           • Define acceptance criteria with the
                             customer and specify it in the
                             automated way, serve the living spec




Sunday, 10 March 13
The BDD “Outside-In” cycle




Sunday, 10 March 13
The BDD “Outside-In” cycle




Sunday, 10 March 13
Gherkin: feature title and narrative
       Feature: Adding movies to the queue




Sunday, 10 March 13
Gherkin: feature title and narrative
       Feature: Adding movies to the queue




Sunday, 10 March 13
Gherkin: feature title and narrative
       Feature: Adding movies to the queue




Sunday, 10 March 13
Gherkin: feature title and narrative
       Feature: Adding movies to the queue




Sunday, 10 March 13
Describing Features with Cucumber
                      Cucumber is a BDD tool that reads plain
                       text descriptions of application features with
                       example scenarios, which can be converted
                       into automation. The text is written in a
                       business readable domain language,
                       known as Gherkin.




Sunday, 10 March 13
Cucumber step definitions




 © 2012 Expedia, Inc..

Sunday, 10 March 13
Describing code with RSpec
                              RSpec is a BDD framework, which is
                               used to write executable examples of
                               the expected behaviour of a small bit
                               of code in a controlled context.


              Code example:                    Output:




Sunday, 10 March 13
Describing code with RSpec




Sunday, 10 March 13
Example: process flow




Sunday, 10 March 13
Example: story card




Sunday, 10 March 13
Describing code with RSpec




Sunday, 10 March 13
Benefits

              •       Communication
              •       Living Documentation
              •       Traceability
              •       Focus on behavior




Sunday, 10 March 13
Sunday, 10 March 13
Testing quadrands




Sunday, 10 March 13
Get the testing pyramid (un)fit
                BEFORE         AFTER




Sunday, 10 March 13
Stubbing services/back-ends




 © 2012 Expedia, Inc..

Sunday, 10 March 13
Stubbing services/back-ends
       • Spoofing the service (replicate behavior with mocked
         backend + store data)

       • Prepared canned responses

       • Stubbing per browser session




 © 2012 Expedia, Inc..

Sunday, 10 March 13
Jenkins: trunk pipeline




     Stage 1                    Stage 2         Stage 3
     - Compile                 - Deploy            - Stub
     - Package                 - isWorking           acceptance
     - Unit tests              - Stub
     - PMD (static analysis)      integration


 © 2012 Expedia, Inc..

Sunday, 10 March 13
Jenkins: trunk pipeline




 © 2012 Expedia, Inc..

Sunday, 10 March 13
CI tips
   • Start small
   • Keep it fast – set a limit
   • Fail Fast
   • Keep it green
   • Everyone is responsible for Quality
   • Pre-checkin Ant Targets


 © 2012 Expedia, Inc..

Sunday, 10 March 13
Speaking the same language =
                     building together

             As an awesome team
             We want to build such a great product
             So that everyone loves it




                                              Given the investment of 22M of bricks
                                              When you place all the bricks properly
                                              Then the Solit Conference Tower
                                               is visible to all people across the Globe




Sunday, 10 March 13
Do not forget to Have Fun!




Sunday, 10 March 13
• alex.ikhelis@gmail.com
      • www.linkedin.com/in/aikhelis/

Sunday, 10 March 13
Recommended reading




                                       by Aliaksandr Ikhelis, 2013
Sunday, 10 March 13

Contenu connexe

Similaire à Solit 2013, Behaviour Driven Development, Ихелис Александр

Marcopolo | Expertise for business communication
Marcopolo | Expertise for business communicationMarcopolo | Expertise for business communication
Marcopolo | Expertise for business communication
Andrea Ioppolo
 
Engineering culture
Engineering cultureEngineering culture
Engineering culture
Pamela Fox
 
Jvm-bdd-quality-driven
Jvm-bdd-quality-drivenJvm-bdd-quality-driven
Jvm-bdd-quality-driven
Amir Barylko
 
Mature agile teams essential patterns v4 - half day workshop
Mature agile teams   essential patterns v4 - half day workshopMature agile teams   essential patterns v4 - half day workshop
Mature agile teams essential patterns v4 - half day workshop
drewz lin
 
Design process
Design processDesign process
Design process
Tim Wright
 
Arch factory - Agile Design: Best Practices
Arch factory - Agile Design: Best PracticesArch factory - Agile Design: Best Practices
Arch factory - Agile Design: Best Practices
Igor Moochnick
 
A year in the life of a Grails startup
A year in the life of a Grails startupA year in the life of a Grails startup
A year in the life of a Grails startup
tomaslin
 

Similaire à Solit 2013, Behaviour Driven Development, Ихелис Александр (20)

Cloud4all Architecture Overview
Cloud4all Architecture OverviewCloud4all Architecture Overview
Cloud4all Architecture Overview
 
Scrum by roofimon
Scrum by roofimonScrum by roofimon
Scrum by roofimon
 
Pair Programming, TDD and other impractical things
Pair Programming, TDD and other impractical thingsPair Programming, TDD and other impractical things
Pair Programming, TDD and other impractical things
 
Marcopolo | Expertise for business communication
Marcopolo | Expertise for business communicationMarcopolo | Expertise for business communication
Marcopolo | Expertise for business communication
 
Engineering culture
Engineering cultureEngineering culture
Engineering culture
 
HTML5 and CSS3: does now really mean now?
HTML5 and CSS3: does now really mean now?HTML5 and CSS3: does now really mean now?
HTML5 and CSS3: does now really mean now?
 
Screencasting
ScreencastingScreencasting
Screencasting
 
Yale waterfall delivery approach training deck
Yale waterfall delivery approach training deckYale waterfall delivery approach training deck
Yale waterfall delivery approach training deck
 
Jvm-bdd-quality-driven
Jvm-bdd-quality-drivenJvm-bdd-quality-driven
Jvm-bdd-quality-driven
 
Mature agile teams essential patterns v4 - half day workshop
Mature agile teams   essential patterns v4 - half day workshopMature agile teams   essential patterns v4 - half day workshop
Mature agile teams essential patterns v4 - half day workshop
 
L'illusione dell'ortogonalità
L'illusione dell'ortogonalitàL'illusione dell'ortogonalità
L'illusione dell'ortogonalità
 
Ultimate agilisttokyo
Ultimate agilisttokyoUltimate agilisttokyo
Ultimate agilisttokyo
 
The Software Debt Bubble: Is It About to Burst
The Software Debt Bubble: Is It About to BurstThe Software Debt Bubble: Is It About to Burst
The Software Debt Bubble: Is It About to Burst
 
Measuring Web Performance - HighEdWeb Edition
Measuring Web Performance - HighEdWeb EditionMeasuring Web Performance - HighEdWeb Edition
Measuring Web Performance - HighEdWeb Edition
 
Design process
Design processDesign process
Design process
 
Skiing and boxing: coaching product and enterprise teams
Skiing and boxing: coaching product and enterprise teamsSkiing and boxing: coaching product and enterprise teams
Skiing and boxing: coaching product and enterprise teams
 
Continuous Delivery
Continuous DeliveryContinuous Delivery
Continuous Delivery
 
Arch factory - Agile Design: Best Practices
Arch factory - Agile Design: Best PracticesArch factory - Agile Design: Best Practices
Arch factory - Agile Design: Best Practices
 
A year in the life of a Grails startup
A year in the life of a Grails startupA year in the life of a Grails startup
A year in the life of a Grails startup
 
Lean Startup for Project Managers
Lean Startup for Project ManagersLean Startup for Project Managers
Lean Startup for Project Managers
 

Plus de solit

Solit 2014, Адраджэнне Памяти аб продках пачынаецца з дзеянняу нашчадкау, Уру...
Solit 2014, Адраджэнне Памяти аб продках пачынаецца з дзеянняу нашчадкау, Уру...Solit 2014, Адраджэнне Памяти аб продках пачынаецца з дзеянняу нашчадкау, Уру...
Solit 2014, Адраджэнне Памяти аб продках пачынаецца з дзеянняу нашчадкау, Уру...
solit
 
Solit 2014, Централизованное управление тестами с помощью TestLink, Зубович В...
Solit 2014, Централизованное управление тестами с помощью TestLink, Зубович В...Solit 2014, Централизованное управление тестами с помощью TestLink, Зубович В...
Solit 2014, Централизованное управление тестами с помощью TestLink, Зубович В...
solit
 
Solit 2014, Инструменты автоматизации тестирования мобильных приложений. Срав...
Solit 2014, Инструменты автоматизации тестирования мобильных приложений. Срав...Solit 2014, Инструменты автоматизации тестирования мобильных приложений. Срав...
Solit 2014, Инструменты автоматизации тестирования мобильных приложений. Срав...
solit
 
Solit 2014, Измеряем производительность Webприложения на сторне клиента с пом...
Solit 2014, Измеряем производительность Webприложения на сторне клиента с пом...Solit 2014, Измеряем производительность Webприложения на сторне клиента с пом...
Solit 2014, Измеряем производительность Webприложения на сторне клиента с пом...
solit
 
Solit 2014, Опыт участия в конкурсе по спортивному программированию Russian A...
Solit 2014, Опыт участия в конкурсе по спортивному программированию Russian A...Solit 2014, Опыт участия в конкурсе по спортивному программированию Russian A...
Solit 2014, Опыт участия в конкурсе по спортивному программированию Russian A...
solit
 

Plus de solit (20)

Jazz team cooperation roadmap
Jazz team cooperation roadmapJazz team cooperation roadmap
Jazz team cooperation roadmap
 
JazzTeam company presentation
JazzTeam company presentationJazzTeam company presentation
JazzTeam company presentation
 
Solit 2014, Agile ValueTeam, учимся понимать Scrum, Семенченко Антон
Solit 2014, Agile ValueTeam, учимся понимать Scrum, Семенченко АнтонSolit 2014, Agile ValueTeam, учимся понимать Scrum, Семенченко Антон
Solit 2014, Agile ValueTeam, учимся понимать Scrum, Семенченко Антон
 
Solit 2014, Scrum guide 2013, Семенченко Антон
Solit 2014, Scrum guide 2013, Семенченко АнтонSolit 2014, Scrum guide 2013, Семенченко Антон
Solit 2014, Scrum guide 2013, Семенченко Антон
 
Solit 2014, Подготовка специалистов в сфере It на факультетe информационных т...
Solit 2014, Подготовка специалистов в сфере It на факультетe информационных т...Solit 2014, Подготовка специалистов в сфере It на факультетe информационных т...
Solit 2014, Подготовка специалистов в сфере It на факультетe информационных т...
 
Solit 2014, Адраджэнне Памяти аб продках пачынаецца з дзеянняу нашчадкау, Уру...
Solit 2014, Адраджэнне Памяти аб продках пачынаецца з дзеянняу нашчадкау, Уру...Solit 2014, Адраджэнне Памяти аб продках пачынаецца з дзеянняу нашчадкау, Уру...
Solit 2014, Адраджэнне Памяти аб продках пачынаецца з дзеянняу нашчадкау, Уру...
 
Solit 2014, Централизованное управление тестами с помощью TestLink, Зубович В...
Solit 2014, Централизованное управление тестами с помощью TestLink, Зубович В...Solit 2014, Централизованное управление тестами с помощью TestLink, Зубович В...
Solit 2014, Централизованное управление тестами с помощью TestLink, Зубович В...
 
Solit 2014, Инструменты автоматизации тестирования мобильных приложений. Срав...
Solit 2014, Инструменты автоматизации тестирования мобильных приложений. Срав...Solit 2014, Инструменты автоматизации тестирования мобильных приложений. Срав...
Solit 2014, Инструменты автоматизации тестирования мобильных приложений. Срав...
 
Solit 2014, Cемантическое ядро сайта, Нагибович Юлия
Solit 2014, Cемантическое ядро сайта, Нагибович ЮлияSolit 2014, Cемантическое ядро сайта, Нагибович Юлия
Solit 2014, Cемантическое ядро сайта, Нагибович Юлия
 
Solit 2014, Геоанамальные зоны и сейсмоакустика. Субъективный взгляд. Миснико...
Solit 2014, Геоанамальные зоны и сейсмоакустика. Субъективный взгляд. Миснико...Solit 2014, Геоанамальные зоны и сейсмоакустика. Субъективный взгляд. Миснико...
Solit 2014, Геоанамальные зоны и сейсмоакустика. Субъективный взгляд. Миснико...
 
Solit 2014, Обзор белоруского интернет потребителя и рекламодателя. Что хочет...
Solit 2014, Обзор белоруского интернет потребителя и рекламодателя. Что хочет...Solit 2014, Обзор белоруского интернет потребителя и рекламодателя. Что хочет...
Solit 2014, Обзор белоруского интернет потребителя и рекламодателя. Что хочет...
 
Solit 2014, Как эффективно организовать Автоматизацию, Семенченко Антон
Solit 2014, Как эффективно организовать Автоматизацию, Семенченко АнтонSolit 2014, Как эффективно организовать Автоматизацию, Семенченко Антон
Solit 2014, Как эффективно организовать Автоматизацию, Семенченко Антон
 
Solit 2014, Freelance and Nearshoring from a Dutch Perspective, Peter Reitsma
Solit 2014, Freelance and Nearshoring from a Dutch Perspective, Peter ReitsmaSolit 2014, Freelance and Nearshoring from a Dutch Perspective, Peter Reitsma
Solit 2014, Freelance and Nearshoring from a Dutch Perspective, Peter Reitsma
 
Solit 2014, Мифы и легенды SEO, Крылов Александр
Solit 2014, Мифы и легенды SEO, Крылов АлександрSolit 2014, Мифы и легенды SEO, Крылов Александр
Solit 2014, Мифы и легенды SEO, Крылов Александр
 
Solit 2014, Измеряем производительность Webприложения на сторне клиента с пом...
Solit 2014, Измеряем производительность Webприложения на сторне клиента с пом...Solit 2014, Измеряем производительность Webприложения на сторне клиента с пом...
Solit 2014, Измеряем производительность Webприложения на сторне клиента с пом...
 
Solit 2014, Непрерывная интеграция сложного проекта. Кто все сломал?, Русаков...
Solit 2014, Непрерывная интеграция сложного проекта. Кто все сломал?, Русаков...Solit 2014, Непрерывная интеграция сложного проекта. Кто все сломал?, Русаков...
Solit 2014, Непрерывная интеграция сложного проекта. Кто все сломал?, Русаков...
 
Solit 2014, Реактивный Javascript. Победа над асинхронностью и вложенностью, ...
Solit 2014, Реактивный Javascript. Победа над асинхронностью и вложенностью, ...Solit 2014, Реактивный Javascript. Победа над асинхронностью и вложенностью, ...
Solit 2014, Реактивный Javascript. Победа над асинхронностью и вложенностью, ...
 
Solit 2014, 3 этапа развития аналитики вашего бизнеса. Как правильно определи...
Solit 2014, 3 этапа развития аналитики вашего бизнеса. Как правильно определи...Solit 2014, 3 этапа развития аналитики вашего бизнеса. Как правильно определи...
Solit 2014, 3 этапа развития аналитики вашего бизнеса. Как правильно определи...
 
Solit 2014, Опыт участия в конкурсе по спортивному программированию Russian A...
Solit 2014, Опыт участия в конкурсе по спортивному программированию Russian A...Solit 2014, Опыт участия в конкурсе по спортивному программированию Russian A...
Solit 2014, Опыт участия в конкурсе по спортивному программированию Russian A...
 
Solit 2014, MapReduce и машинное обучение на hadoop и mahout, Слисенко Конста...
Solit 2014, MapReduce и машинное обучение на hadoop и mahout, Слисенко Конста...Solit 2014, MapReduce и машинное обучение на hadoop и mahout, Слисенко Конста...
Solit 2014, MapReduce и машинное обучение на hadoop и mahout, Слисенко Конста...
 

Dernier

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Dernier (20)

AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
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)
 
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...
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
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...
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
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
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
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
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
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
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
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
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 

Solit 2013, Behaviour Driven Development, Ихелис Александр

  • 1. Behavior Driven Development by Aliaksandr Ikhelis, 2013 @Expedia.com Sunday, 10 March 13
  • 2. Agenda • BDD • Development workflow • Testing quadrants (types of tests) • Testing Pyramid • Stubbing in Functional Tests • Continuous Integration Sunday, 10 March 13
  • 3. Communication Issue They are They do not know slow!.. what they need!.. Sunday, 10 March 13
  • 4. Communication Issue They are They do not know slow!.. what they need!.. Sunday, 10 March 13
  • 7. Behavior Driven Development BDD is an evolution in the thinking behind TDD & ATDP Focus on delivery of the prioritized and verifiable business value by providing a common vocabulary Sunday, 10 March 13
  • 8. Behavior Driven Development Practices Sunday, 10 March 13
  • 9. Behavior Driven Development Practices • Establish goals Sunday, 10 March 13
  • 10. Behavior Driven Development Practices • Establish goals • Draw out features using feature injection Sunday, 10 March 13
  • 11. Behavior Driven Development Practices • Establish goals • Draw out features using feature injection • Involve stakeholders in the implementation process through outside-in software development Sunday, 10 March 13
  • 12. Behavior Driven Development Practices • Establish goals • Draw out features using feature injection • Involve stakeholders in the implementation process through outside-in software development • Use examples to describe behavior Sunday, 10 March 13
  • 13. Behavior Driven Development Practices • Establish goals • Draw out features using feature injection • Involve stakeholders in the implementation process through outside-in software development • Use examples to describe behavior • Automate examples to provide quick feedback and regression testing Sunday, 10 March 13
  • 14. What BDD adds to TDD Sunday, 10 March 13
  • 15. What BDD adds to TDD • Test what an object does instead of what it is Sunday, 10 March 13
  • 16. What BDD adds to TDD • Test what an object does instead of what it is • Design top-down, which is essential for YAGNI – You Aren't Gonna Need It Sunday, 10 March 13
  • 17. What BDD adds to TDD • Test what an object does instead of what it is • Design top-down, which is essential for YAGNI – You Aren't Gonna Need It • Define acceptance criteria with the customer and specify it in the automated way, serve the living spec Sunday, 10 March 13
  • 18. The BDD “Outside-In” cycle Sunday, 10 March 13
  • 19. The BDD “Outside-In” cycle Sunday, 10 March 13
  • 20. Gherkin: feature title and narrative Feature: Adding movies to the queue Sunday, 10 March 13
  • 21. Gherkin: feature title and narrative Feature: Adding movies to the queue Sunday, 10 March 13
  • 22. Gherkin: feature title and narrative Feature: Adding movies to the queue Sunday, 10 March 13
  • 23. Gherkin: feature title and narrative Feature: Adding movies to the queue Sunday, 10 March 13
  • 24. Describing Features with Cucumber Cucumber is a BDD tool that reads plain text descriptions of application features with example scenarios, which can be converted into automation. The text is written in a business readable domain language, known as Gherkin. Sunday, 10 March 13
  • 25. Cucumber step definitions © 2012 Expedia, Inc.. Sunday, 10 March 13
  • 26. Describing code with RSpec RSpec is a BDD framework, which is used to write executable examples of the expected behaviour of a small bit of code in a controlled context. Code example: Output: Sunday, 10 March 13
  • 27. Describing code with RSpec Sunday, 10 March 13
  • 30. Describing code with RSpec Sunday, 10 March 13
  • 31. Benefits • Communication • Living Documentation • Traceability • Focus on behavior Sunday, 10 March 13
  • 34. Get the testing pyramid (un)fit BEFORE AFTER Sunday, 10 March 13
  • 35. Stubbing services/back-ends © 2012 Expedia, Inc.. Sunday, 10 March 13
  • 36. Stubbing services/back-ends • Spoofing the service (replicate behavior with mocked backend + store data) • Prepared canned responses • Stubbing per browser session © 2012 Expedia, Inc.. Sunday, 10 March 13
  • 37. Jenkins: trunk pipeline Stage 1 Stage 2 Stage 3 - Compile - Deploy - Stub - Package - isWorking acceptance - Unit tests - Stub - PMD (static analysis) integration © 2012 Expedia, Inc.. Sunday, 10 March 13
  • 38. Jenkins: trunk pipeline © 2012 Expedia, Inc.. Sunday, 10 March 13
  • 39. CI tips • Start small • Keep it fast – set a limit • Fail Fast • Keep it green • Everyone is responsible for Quality • Pre-checkin Ant Targets © 2012 Expedia, Inc.. Sunday, 10 March 13
  • 40. Speaking the same language = building together As an awesome team We want to build such a great product So that everyone loves it Given the investment of 22M of bricks When you place all the bricks properly Then the Solit Conference Tower is visible to all people across the Globe Sunday, 10 March 13
  • 41. Do not forget to Have Fun! Sunday, 10 March 13
  • 42. • alex.ikhelis@gmail.com • www.linkedin.com/in/aikhelis/ Sunday, 10 March 13
  • 43. Recommended reading by Aliaksandr Ikhelis, 2013 Sunday, 10 March 13