SlideShare une entreprise Scribd logo
1  sur  17
Télécharger pour lire hors ligne
Alex Litvinok




BDD: WTF?                                                    @#
 Have you ever heard of BDD/Gherkin/etc.?
               true is near..




           © 1993-2012. EPAM Systems. All Rights Reserved.
Behavior Driven Development
  .. this is just behavioral specifications.
TDD
DDD




            Automation
            Testing
      BDD
Feature: Post articles

    In order to show trip photos
    A owner
    Should be abble to post article

    Scenario: Post article by owner
       Given I signed up as owner
       When I write article "About myself"
       And I post article
       Then I should see "Article is created"
This is Gherkin..
Just..
Given/ When/ And / Then
Implementation.
   Cucumber
Given /^I signed up as owner$/ do
    pending
end
– Ruby
Scenario               Step Definition                 Domain Classes




                                         Integration
           Scripting
Scenarios should be:
   Easy to understand
       Consistent
     Easy to access
Experience
Task
Check possibility of read/write for MySQL in the PHP
Feature: Check read/write for MySQL in PHP

   Scenario: Check write
      Given connection to MySQL
      When database and a table is selected
      Then some data is inserted

   Scenario: Check read
      Given connection to MySQL
      When database and a table is selected
      And some data is inserted
      Then some data is read
We've got the following steps:
1. connection to MySQL
2. database and a table is selected
3. some data is inserted
4. some data is read
…

/**
  * @Given /^ connection to MySQL$/
  */
  public function connect()
  {
     $this -> conn = mysql_connect();

      if ( ! $this -> conn ) {
          throw new Exception();
      }
  }

  …
Resume

     BDD is a software development process.
     It is based on the behavior specification.
 Gherkin is a meta language for writing scenarious.
Cucumber is tool for testing on different languages.
Alexander Litvinok (software engineer) "bdd wtf"

Contenu connexe

Tendances

Web development basics (Part-2)
Web development basics (Part-2)Web development basics (Part-2)
Web development basics (Part-2)Rajat Pratap Singh
 
MongoDB: The Ultimate Backpack for the Cloud
MongoDB: The Ultimate Backpack for the CloudMongoDB: The Ultimate Backpack for the Cloud
MongoDB: The Ultimate Backpack for the CloudJoe Brinkman
 
Actors and Threads
Actors and ThreadsActors and Threads
Actors and Threadsmperham
 
Actor Patterns and NATS - Boulder Meetup
Actor Patterns and NATS - Boulder MeetupActor Patterns and NATS - Boulder Meetup
Actor Patterns and NATS - Boulder MeetupApcera
 

Tendances (6)

Web development basics (Part-2)
Web development basics (Part-2)Web development basics (Part-2)
Web development basics (Part-2)
 
MongoDB: The Ultimate Backpack for the Cloud
MongoDB: The Ultimate Backpack for the CloudMongoDB: The Ultimate Backpack for the Cloud
MongoDB: The Ultimate Backpack for the Cloud
 
Actors and Threads
Actors and ThreadsActors and Threads
Actors and Threads
 
Cucumber
CucumberCucumber
Cucumber
 
Selenium
SeleniumSelenium
Selenium
 
Actor Patterns and NATS - Boulder Meetup
Actor Patterns and NATS - Boulder MeetupActor Patterns and NATS - Boulder Meetup
Actor Patterns and NATS - Boulder Meetup
 

En vedette

Bdd agile requirements
Bdd agile requirementsBdd agile requirements
Bdd agile requirementsAgile Vietnam
 
Implementing the Click - Per Åkerberg
Implementing the Click - Per ÅkerbergImplementing the Click - Per Åkerberg
Implementing the Click - Per ÅkerbergSmartBear
 
Keeping it Real real Cukeup2015
Keeping it Real real Cukeup2015Keeping it Real real Cukeup2015
Keeping it Real real Cukeup2015jennyjmar
 
Writing Requirements Right
Writing Requirements RightWriting Requirements Right
Writing Requirements RightHani Massoud
 
Gherkin - crash course
Gherkin - crash courseGherkin - crash course
Gherkin - crash courseMichele Costa
 

En vedette (6)

Bdd and Agile Requirements
Bdd and Agile RequirementsBdd and Agile Requirements
Bdd and Agile Requirements
 
Bdd agile requirements
Bdd agile requirementsBdd agile requirements
Bdd agile requirements
 
Implementing the Click - Per Åkerberg
Implementing the Click - Per ÅkerbergImplementing the Click - Per Åkerberg
Implementing the Click - Per Åkerberg
 
Keeping it Real real Cukeup2015
Keeping it Real real Cukeup2015Keeping it Real real Cukeup2015
Keeping it Real real Cukeup2015
 
Writing Requirements Right
Writing Requirements RightWriting Requirements Right
Writing Requirements Right
 
Gherkin - crash course
Gherkin - crash courseGherkin - crash course
Gherkin - crash course
 

Similaire à Alexander Litvinok (software engineer) "bdd wtf"

Object Oriented Views / Aki Salmi
Object Oriented Views / Aki SalmiObject Oriented Views / Aki Salmi
Object Oriented Views / Aki SalmiAki Salmi
 
Securing Your MongoDB Implementation
Securing Your MongoDB ImplementationSecuring Your MongoDB Implementation
Securing Your MongoDB ImplementationMongoDB
 
Behat - Drupal South 2018
Behat  - Drupal South 2018Behat  - Drupal South 2018
Behat - Drupal South 2018Berend de Boer
 
Bridging the gap between business and technology - Behaviour Driven Developme...
Bridging the gap between business and technology - Behaviour Driven Developme...Bridging the gap between business and technology - Behaviour Driven Developme...
Bridging the gap between business and technology - Behaviour Driven Developme...marcin_pajdzik
 
React Native: React Meetup 3
React Native: React Meetup 3React Native: React Meetup 3
React Native: React Meetup 3Rob Gietema
 
The Spring Data MongoDB Project
The Spring Data MongoDB ProjectThe Spring Data MongoDB Project
The Spring Data MongoDB ProjectMongoDB
 
Building A SaaS with CoreOS, Docker, and Etcd
Building A SaaS with CoreOS, Docker, and EtcdBuilding A SaaS with CoreOS, Docker, and Etcd
Building A SaaS with CoreOS, Docker, and EtcdRoss Kukulinski
 
Joxean Koret - Database Security Paradise [Rooted CON 2011]
Joxean Koret - Database Security Paradise [Rooted CON 2011]Joxean Koret - Database Security Paradise [Rooted CON 2011]
Joxean Koret - Database Security Paradise [Rooted CON 2011]RootedCON
 
Automation testing using Ruby with Cucumber in Docker
Automation testing using Ruby with Cucumber in DockerAutomation testing using Ruby with Cucumber in Docker
Automation testing using Ruby with Cucumber in DockerViacheslav Horbovskykh
 
Look Again at the ZCA
Look Again at the ZCALook Again at the ZCA
Look Again at the ZCAmikerhodes
 
Deploying a simple Rails application with AWS Elastic Beanstalk
Deploying a simple Rails application with AWS Elastic BeanstalkDeploying a simple Rails application with AWS Elastic Beanstalk
Deploying a simple Rails application with AWS Elastic BeanstalkJulien SIMON
 
Introduction to Docker
Introduction to DockerIntroduction to Docker
Introduction to DockerLuong Vo
 
Buildr - build like you code
Buildr -  build like you codeBuildr -  build like you code
Buildr - build like you codeIzzet Mustafaiev
 
SD, a P2P bug tracking system
SD, a P2P bug tracking systemSD, a P2P bug tracking system
SD, a P2P bug tracking systemJesse Vincent
 
NanoSec Conference 2019: Code Execution Analysis in Mobile Apps - Abdullah Jo...
NanoSec Conference 2019: Code Execution Analysis in Mobile Apps - Abdullah Jo...NanoSec Conference 2019: Code Execution Analysis in Mobile Apps - Abdullah Jo...
NanoSec Conference 2019: Code Execution Analysis in Mobile Apps - Abdullah Jo...Hafez Kamal
 

Similaire à Alexander Litvinok (software engineer) "bdd wtf" (20)

Object Oriented Views / Aki Salmi
Object Oriented Views / Aki SalmiObject Oriented Views / Aki Salmi
Object Oriented Views / Aki Salmi
 
Securing Your MongoDB Implementation
Securing Your MongoDB ImplementationSecuring Your MongoDB Implementation
Securing Your MongoDB Implementation
 
Rails cantrips
Rails cantripsRails cantrips
Rails cantrips
 
Behat - Drupal South 2018
Behat  - Drupal South 2018Behat  - Drupal South 2018
Behat - Drupal South 2018
 
Bridging the gap between business and technology - Behaviour Driven Developme...
Bridging the gap between business and technology - Behaviour Driven Developme...Bridging the gap between business and technology - Behaviour Driven Developme...
Bridging the gap between business and technology - Behaviour Driven Developme...
 
React Native: React Meetup 3
React Native: React Meetup 3React Native: React Meetup 3
React Native: React Meetup 3
 
The Spring Data MongoDB Project
The Spring Data MongoDB ProjectThe Spring Data MongoDB Project
The Spring Data MongoDB Project
 
Cucumber
CucumberCucumber
Cucumber
 
Cucumber & BDD
Cucumber & BDDCucumber & BDD
Cucumber & BDD
 
Difference between php and node
Difference between php and nodeDifference between php and node
Difference between php and node
 
Building A SaaS with CoreOS, Docker, and Etcd
Building A SaaS with CoreOS, Docker, and EtcdBuilding A SaaS with CoreOS, Docker, and Etcd
Building A SaaS with CoreOS, Docker, and Etcd
 
Joxean Koret - Database Security Paradise [Rooted CON 2011]
Joxean Koret - Database Security Paradise [Rooted CON 2011]Joxean Koret - Database Security Paradise [Rooted CON 2011]
Joxean Koret - Database Security Paradise [Rooted CON 2011]
 
Automation testing using Ruby with Cucumber in Docker
Automation testing using Ruby with Cucumber in DockerAutomation testing using Ruby with Cucumber in Docker
Automation testing using Ruby with Cucumber in Docker
 
Look Again at the ZCA
Look Again at the ZCALook Again at the ZCA
Look Again at the ZCA
 
Deploying a simple Rails application with AWS Elastic Beanstalk
Deploying a simple Rails application with AWS Elastic BeanstalkDeploying a simple Rails application with AWS Elastic Beanstalk
Deploying a simple Rails application with AWS Elastic Beanstalk
 
Ruby talk romania
Ruby talk romaniaRuby talk romania
Ruby talk romania
 
Introduction to Docker
Introduction to DockerIntroduction to Docker
Introduction to Docker
 
Buildr - build like you code
Buildr -  build like you codeBuildr -  build like you code
Buildr - build like you code
 
SD, a P2P bug tracking system
SD, a P2P bug tracking systemSD, a P2P bug tracking system
SD, a P2P bug tracking system
 
NanoSec Conference 2019: Code Execution Analysis in Mobile Apps - Abdullah Jo...
NanoSec Conference 2019: Code Execution Analysis in Mobile Apps - Abdullah Jo...NanoSec Conference 2019: Code Execution Analysis in Mobile Apps - Abdullah Jo...
NanoSec Conference 2019: Code Execution Analysis in Mobile Apps - Abdullah Jo...
 

Plus de EPAM Systems

“Xcore (library) for android platform” by Uladzimir Klyshevich
“Xcore (library) for android platform” by Uladzimir Klyshevich“Xcore (library) for android platform” by Uladzimir Klyshevich
“Xcore (library) for android platform” by Uladzimir KlyshevichEPAM Systems
 
"Как общаться эффективнее" by Natallia Kapatsevich
"Как общаться эффективнее" by Natallia Kapatsevich"Как общаться эффективнее" by Natallia Kapatsevich
"Как общаться эффективнее" by Natallia KapatsevichEPAM Systems
 
"Connections: Что общего у Шотландии и Дональда Трампа?" by Yevgeniy Rozenblat
"Connections: Что общего у Шотландии и Дональда Трампа?" by Yevgeniy Rozenblat "Connections: Что общего у Шотландии и Дональда Трампа?" by Yevgeniy Rozenblat
"Connections: Что общего у Шотландии и Дональда Трампа?" by Yevgeniy Rozenblat EPAM Systems
 
ДмитрийРадченко, "Brief introduction to dundas"
ДмитрийРадченко, "Brief introduction to dundas"ДмитрийРадченко, "Brief introduction to dundas"
ДмитрийРадченко, "Brief introduction to dundas"EPAM Systems
 
Абрамович Максим, "Rad studio xe4"
Абрамович Максим, "Rad studio xe4"Абрамович Максим, "Rad studio xe4"
Абрамович Максим, "Rad studio xe4"EPAM Systems
 
Miniq 11: Time management by Anton Zolotarev & Andrei Artisheuski
Miniq 11: Time management by Anton Zolotarev & Andrei ArtisheuskiMiniq 11: Time management by Anton Zolotarev & Andrei Artisheuski
Miniq 11: Time management by Anton Zolotarev & Andrei ArtisheuskiEPAM Systems
 
Reporting куда как-зачем by Anton Stoliar
Reporting   куда как-зачем by Anton StoliarReporting   куда как-зачем by Anton Stoliar
Reporting куда как-зачем by Anton StoliarEPAM Systems
 
Pool and billiards by Olga Nikolaeva
Pool and billiards by Olga NikolaevaPool and billiards by Olga Nikolaeva
Pool and billiards by Olga NikolaevaEPAM Systems
 
The Way of Creating Presentations: Just do it!
The Way of Creating Presentations: Just do it!The Way of Creating Presentations: Just do it!
The Way of Creating Presentations: Just do it!EPAM Systems
 
E-mail Communication: How and Why
E-mail Communication: How and WhyE-mail Communication: How and Why
E-mail Communication: How and WhyEPAM Systems
 
николай фролов, “Gamification“
николай фролов, “Gamification“николай фролов, “Gamification“
николай фролов, “Gamification“EPAM Systems
 
Real time bidding by Danil Melnikov
Real time bidding by Danil MelnikovReal time bidding by Danil Melnikov
Real time bidding by Danil MelnikovEPAM Systems
 
Никита Манько “Code review”
Никита Манько “Code review”Никита Манько “Code review”
Никита Манько “Code review”EPAM Systems
 
Чурюканов Вячеслав, “Code simple, but not simpler”
Чурюканов Вячеслав, “Code simple, but not simpler”Чурюканов Вячеслав, “Code simple, but not simpler”
Чурюканов Вячеслав, “Code simple, but not simpler”EPAM Systems
 
Демидюк Павел , “Continuous integration with the real traffic light in m&e of...
Демидюк Павел , “Continuous integration with the real traffic light in m&e of...Демидюк Павел , “Continuous integration with the real traffic light in m&e of...
Демидюк Павел , “Continuous integration with the real traffic light in m&e of...EPAM Systems
 
Agile retrospectives by nick frolov miniq
Agile retrospectives by nick frolov   miniqAgile retrospectives by nick frolov   miniq
Agile retrospectives by nick frolov miniqEPAM Systems
 
Other way to travel by Anna Lukyanenka
Other way to travel by Anna LukyanenkaOther way to travel by Anna Lukyanenka
Other way to travel by Anna LukyanenkaEPAM Systems
 
Computer as a musical instrument by Sergey Moiseychik
Computer as a musical instrument by Sergey MoiseychikComputer as a musical instrument by Sergey Moiseychik
Computer as a musical instrument by Sergey MoiseychikEPAM Systems
 
Антон Золотарев, Екатерина Невельская "По следам SQA days"
Антон Золотарев, Екатерина Невельская "По следам SQA days"Антон Золотарев, Екатерина Невельская "По следам SQA days"
Антон Золотарев, Екатерина Невельская "По следам SQA days"EPAM Systems
 
Сергей Семашко "End to end test: cheap and effective"
Сергей Семашко "End to end test: cheap and effective"Сергей Семашко "End to end test: cheap and effective"
Сергей Семашко "End to end test: cheap and effective"EPAM Systems
 

Plus de EPAM Systems (20)

“Xcore (library) for android platform” by Uladzimir Klyshevich
“Xcore (library) for android platform” by Uladzimir Klyshevich“Xcore (library) for android platform” by Uladzimir Klyshevich
“Xcore (library) for android platform” by Uladzimir Klyshevich
 
"Как общаться эффективнее" by Natallia Kapatsevich
"Как общаться эффективнее" by Natallia Kapatsevich"Как общаться эффективнее" by Natallia Kapatsevich
"Как общаться эффективнее" by Natallia Kapatsevich
 
"Connections: Что общего у Шотландии и Дональда Трампа?" by Yevgeniy Rozenblat
"Connections: Что общего у Шотландии и Дональда Трампа?" by Yevgeniy Rozenblat "Connections: Что общего у Шотландии и Дональда Трампа?" by Yevgeniy Rozenblat
"Connections: Что общего у Шотландии и Дональда Трампа?" by Yevgeniy Rozenblat
 
ДмитрийРадченко, "Brief introduction to dundas"
ДмитрийРадченко, "Brief introduction to dundas"ДмитрийРадченко, "Brief introduction to dundas"
ДмитрийРадченко, "Brief introduction to dundas"
 
Абрамович Максим, "Rad studio xe4"
Абрамович Максим, "Rad studio xe4"Абрамович Максим, "Rad studio xe4"
Абрамович Максим, "Rad studio xe4"
 
Miniq 11: Time management by Anton Zolotarev & Andrei Artisheuski
Miniq 11: Time management by Anton Zolotarev & Andrei ArtisheuskiMiniq 11: Time management by Anton Zolotarev & Andrei Artisheuski
Miniq 11: Time management by Anton Zolotarev & Andrei Artisheuski
 
Reporting куда как-зачем by Anton Stoliar
Reporting   куда как-зачем by Anton StoliarReporting   куда как-зачем by Anton Stoliar
Reporting куда как-зачем by Anton Stoliar
 
Pool and billiards by Olga Nikolaeva
Pool and billiards by Olga NikolaevaPool and billiards by Olga Nikolaeva
Pool and billiards by Olga Nikolaeva
 
The Way of Creating Presentations: Just do it!
The Way of Creating Presentations: Just do it!The Way of Creating Presentations: Just do it!
The Way of Creating Presentations: Just do it!
 
E-mail Communication: How and Why
E-mail Communication: How and WhyE-mail Communication: How and Why
E-mail Communication: How and Why
 
николай фролов, “Gamification“
николай фролов, “Gamification“николай фролов, “Gamification“
николай фролов, “Gamification“
 
Real time bidding by Danil Melnikov
Real time bidding by Danil MelnikovReal time bidding by Danil Melnikov
Real time bidding by Danil Melnikov
 
Никита Манько “Code review”
Никита Манько “Code review”Никита Манько “Code review”
Никита Манько “Code review”
 
Чурюканов Вячеслав, “Code simple, but not simpler”
Чурюканов Вячеслав, “Code simple, but not simpler”Чурюканов Вячеслав, “Code simple, but not simpler”
Чурюканов Вячеслав, “Code simple, but not simpler”
 
Демидюк Павел , “Continuous integration with the real traffic light in m&e of...
Демидюк Павел , “Continuous integration with the real traffic light in m&e of...Демидюк Павел , “Continuous integration with the real traffic light in m&e of...
Демидюк Павел , “Continuous integration with the real traffic light in m&e of...
 
Agile retrospectives by nick frolov miniq
Agile retrospectives by nick frolov   miniqAgile retrospectives by nick frolov   miniq
Agile retrospectives by nick frolov miniq
 
Other way to travel by Anna Lukyanenka
Other way to travel by Anna LukyanenkaOther way to travel by Anna Lukyanenka
Other way to travel by Anna Lukyanenka
 
Computer as a musical instrument by Sergey Moiseychik
Computer as a musical instrument by Sergey MoiseychikComputer as a musical instrument by Sergey Moiseychik
Computer as a musical instrument by Sergey Moiseychik
 
Антон Золотарев, Екатерина Невельская "По следам SQA days"
Антон Золотарев, Екатерина Невельская "По следам SQA days"Антон Золотарев, Екатерина Невельская "По следам SQA days"
Антон Золотарев, Екатерина Невельская "По следам SQA days"
 
Сергей Семашко "End to end test: cheap and effective"
Сергей Семашко "End to end test: cheap and effective"Сергей Семашко "End to end test: cheap and effective"
Сергей Семашко "End to end test: cheap and effective"
 

Alexander Litvinok (software engineer) "bdd wtf"

  • 1. Alex Litvinok BDD: WTF? @# Have you ever heard of BDD/Gherkin/etc.? true is near.. © 1993-2012. EPAM Systems. All Rights Reserved.
  • 2. Behavior Driven Development .. this is just behavioral specifications.
  • 3. TDD DDD Automation Testing BDD
  • 4. Feature: Post articles In order to show trip photos A owner Should be abble to post article Scenario: Post article by owner Given I signed up as owner When I write article "About myself" And I post article Then I should see "Article is created"
  • 7. Implementation. Cucumber
  • 8. Given /^I signed up as owner$/ do pending end – Ruby
  • 9. Scenario Step Definition Domain Classes Integration Scripting
  • 10. Scenarios should be: Easy to understand Consistent Easy to access
  • 12. Task Check possibility of read/write for MySQL in the PHP
  • 13. Feature: Check read/write for MySQL in PHP Scenario: Check write Given connection to MySQL When database and a table is selected Then some data is inserted Scenario: Check read Given connection to MySQL When database and a table is selected And some data is inserted Then some data is read
  • 14. We've got the following steps: 1. connection to MySQL 2. database and a table is selected 3. some data is inserted 4. some data is read
  • 15. … /** * @Given /^ connection to MySQL$/ */ public function connect() { $this -> conn = mysql_connect(); if ( ! $this -> conn ) { throw new Exception(); } } …
  • 16. Resume BDD is a software development process. It is based on the behavior specification. Gherkin is a meta language for writing scenarious. Cucumber is tool for testing on different languages.