SlideShare a Scribd company logo
tekst
BDD vs Behat
Paweł Skotnicki
About me
PHP developer @ The Software House
PHPers Silesia co-organizer
BDD/DDD enthusiast
BDD
Behaviour Driven Development
Dan North, 2003
BDD is like TDD without world „test”
examples in ubiquitous language
using those examples as the basis of automated tests
BDD main parts
Scenarios
writing down is NOT most important part
conversation
Behat
an open source BDD framework for PHP
Gherkin language
Given, When, Then
Behat !== BDD
BDD = scenarios + automation
Behat = automation tool
Better scenarios?
Imperative vs Declarative
Imperative
reusable granular steps
binds to UI
Declarative
business language
Mink Extension example
BDD vs Behat
BDD vs Behat
Imperative
Feature: Search
In order to see a word definition
As a website user
I need to be able to search for a word
Scenario: Searching for a page that does exist
Given I am on "/wiki/Main_Page"
When I fill in "search" with "Behavior Driven Development"
And I press "searchButton"
Then I should see "agile software development"
Feature: Search
In order to see a word definition
As a website user
I need to be able to search for a word
Scenario: Searching for a page that does exist
Given there is „Behavior Driven Development” article
And there is „agile software development” article
When I search for "Behavior Driven Development"
Then there should be "agile software development” reference
Declarative
Imperative
Scenario: Registering with already used e-mail
Given there are following users:
| username | password | email | active |
| testuser1 | test1 | test@test.pl | 1 |
When I am on „/register” page
And I fill in „username” with „newuser”
And I fill in „password” with „123456”
And I fill in „email” with „test@test.pl”
And I press „register”
Then I should see „e-mail is already used”
Declarative
Scenario: Registering with already used e-mail
Given there is registered user with „test@test.pl” e-mail
When I try to register with „test@test.pl” e-mail
Then I should be notified that e-mail is already used
Scenario: Purchasing a product
Given there is „Lightsaber” which costs $5
When I add „Lightsaber” to basket
Then there should be „Lightsaber” in my basket
When I check out my basket
Then I should be charged for $5
Many activities
Scenario: Adding product to basket
Given there is „Lightsaber”
When I add „Lightsaber” to basket
Then there should be „Lightsaber” in my basket
Scenario: Checking out basket
Given there is „Lightsaber” which costs $5 in my basket
When I check out my basket
Then I should be charged for $5
One activity
Tips
avoid implementation details
use ubiquitous language
ask for examples
describe one activity
Questions?
Thank you

More Related Content

PPTX
Web development basics
PPT
Lesson 2: Getting To Know HTML
POTX
Introduction to PHP - Slide 1
PPTX
Html part 2
KEY
DM 250 Week 1 - The Internet, XHTML, & CSS
PPTX
Very basic intro to HTML
PPT
1. html introduction
PPTX
How To Become A Web Page Master Builder
Web development basics
Lesson 2: Getting To Know HTML
Introduction to PHP - Slide 1
Html part 2
DM 250 Week 1 - The Internet, XHTML, & CSS
Very basic intro to HTML
1. html introduction
How To Become A Web Page Master Builder

What's hot (20)

PPTX
Html.ppt
PDF
Teaching Web Frontend Technologies To A Toddler
PDF
Php workshop L02 php basics
PDF
Introduction to HTML
PDF
Php workshop L0 Introduction
PPTX
Html
PPT
PPTX
How to Write a Clean HTML Blog Post for your CMS
PPTX
HTML BASIC BY SHASHI KANT SINGH HAJIPUR
PPTX
Introducing HTML
PDF
Introduction to HTML5
PPT
PPTX
Lesson 3
PDF
Php workshop L01 CSS
PPTX
Khoa dang (kay)
PPT
Introduction to Html
PDF
Web Development Workshop (Front End)
PPTX
Htmlcss1
PPT
Html.ppt
Teaching Web Frontend Technologies To A Toddler
Php workshop L02 php basics
Introduction to HTML
Php workshop L0 Introduction
Html
How to Write a Clean HTML Blog Post for your CMS
HTML BASIC BY SHASHI KANT SINGH HAJIPUR
Introducing HTML
Introduction to HTML5
Lesson 3
Php workshop L01 CSS
Khoa dang (kay)
Introduction to Html
Web Development Workshop (Front End)
Htmlcss1
Ad

Viewers also liked (20)

PDF
Red Green Hotfix – złudne poczucie bezpieczeństwa w testach
PDF
ReactPHP – reaktor jądrowy w PHP
PDF
Wprowadzenie do języka Swift, czyli nowe podejście do programowania aplikacji...
PDF
Developer mode on, czyli słów kilka o rbenv, rvm i ruby-ng
PDF
Nie wszystko, co ubite, w ziemi zostaje. Wprowadzenie do Event Sourcing
PDF
REvolution, czyli o bardziej obiektowym podejściu w Railsach
PDF
Jak ugryźć Ruby, żeby nie połamać zębów?
PDF
Pierwsza aplikacja na iOS, czyli z czym można się spotkać, co jest trudne i c...
PDF
O wyprawie królika przez maszynkę do gniazdka, czyli EventMachine w praktyce
PDF
Znaki mocy dla laików – Programowanie funkcyjne w JavaScript
PDF
Bestiariusza wpisy wybrane
PDF
Praktyczne porady na temat optymalizacji wydajności aplikacji tworzonych z u...
PDF
Gulp.js - alternatywa do Grunta
PDF
Pi razy drzwi - o szacowaniu projektów
PDF
O Electronie słów kilka
PDF
PDF
Bitcoin - (nie)udany eksperyment?
PDF
Wielkie protokoły wielkich ludzi
PDF
Angular 2.0 – Kochaj albo rzuć!
Red Green Hotfix – złudne poczucie bezpieczeństwa w testach
ReactPHP – reaktor jądrowy w PHP
Wprowadzenie do języka Swift, czyli nowe podejście do programowania aplikacji...
Developer mode on, czyli słów kilka o rbenv, rvm i ruby-ng
Nie wszystko, co ubite, w ziemi zostaje. Wprowadzenie do Event Sourcing
REvolution, czyli o bardziej obiektowym podejściu w Railsach
Jak ugryźć Ruby, żeby nie połamać zębów?
Pierwsza aplikacja na iOS, czyli z czym można się spotkać, co jest trudne i c...
O wyprawie królika przez maszynkę do gniazdka, czyli EventMachine w praktyce
Znaki mocy dla laików – Programowanie funkcyjne w JavaScript
Bestiariusza wpisy wybrane
Praktyczne porady na temat optymalizacji wydajności aplikacji tworzonych z u...
Gulp.js - alternatywa do Grunta
Pi razy drzwi - o szacowaniu projektów
O Electronie słów kilka
Bitcoin - (nie)udany eksperyment?
Wielkie protokoły wielkich ludzi
Angular 2.0 – Kochaj albo rzuć!
Ad

Similar to BDD vs Behat (20)

PDF
Why BDD is our BFF
PDF
Behaviour-Driven Development with Hera (ESUG2025)
PPTX
Behat, Test Driven Framework for BDD by Jeevan Bhushetty
PPTX
Behat - human-readable automated testing
PPTX
BDD, Behat & Drupal
ODP
Behaviour Driven Development
PPTX
I, For One, Welcome Our New Robot Overlords
PPTX
Behaviour Driven Development
PDF
27_07_Landing Pages_Gilles de Clerck_EIA Porto 2022.pdf
PDF
Cucumber & BDD
PDF
ITB2017 - Intro to Behavior Driven Development
PPTX
Fast and Reliable Continuous Delivery with BDD
PPTX
Landing pages Gilles.pptx
PDF
Alexey klochay and "Wizard on Demand"
PDF
Product design for Non Designers - Montreal Digital Nomad Meetup
PDF
BDD & Cucumber
PPTX
Behat - Drupal South 2018
PDF
Story Driven Development With Cucumber
PDF
How getting your hands dirty with code makes you a better business leader @ V...
PDF
How getting your hands dirty with code makes you a better business leader @ V...
Why BDD is our BFF
Behaviour-Driven Development with Hera (ESUG2025)
Behat, Test Driven Framework for BDD by Jeevan Bhushetty
Behat - human-readable automated testing
BDD, Behat & Drupal
Behaviour Driven Development
I, For One, Welcome Our New Robot Overlords
Behaviour Driven Development
27_07_Landing Pages_Gilles de Clerck_EIA Porto 2022.pdf
Cucumber & BDD
ITB2017 - Intro to Behavior Driven Development
Fast and Reliable Continuous Delivery with BDD
Landing pages Gilles.pptx
Alexey klochay and "Wizard on Demand"
Product design for Non Designers - Montreal Digital Nomad Meetup
BDD & Cucumber
Behat - Drupal South 2018
Story Driven Development With Cucumber
How getting your hands dirty with code makes you a better business leader @ V...
How getting your hands dirty with code makes you a better business leader @ V...

More from The Software House (20)

PDF
Jak kraść miliony, czyli o błędach bezpieczeństwa, które mogą spotkać również...
PDF
Uszanowanko Podsumowanko
PDF
Jak efektywnie podejść do certyfikacji w AWS?
PDF
O co chodzi z tą dostępnością cyfrową?
PDF
Chat tekstowy z użyciem Amazon Chime
PDF
Migracje danych serverless
PDF
Jak nie zwariować z architekturą Serverless?
PDF
Analiza semantyczna artykułów prasowych w 5 sprintów z użyciem AWS
PDF
Feature flags na ratunek projektu w JavaScript
PDF
Typowanie nominalne w TypeScript
PDF
Automatyzacja tworzenia frontendu z wykorzystaniem GraphQL
PDF
Serverless Compose vs hurtownia danych
PDF
Testy API: połączenie z bazą danych czy implementacja w pamięci
PDF
Jak skutecznie read model. Case study
PDF
Firestore czyli ognista baza od giganta z Doliny Krzemowej
PDF
Jak utrzymać stado Lambd w ryzach
PDF
Jak poskromić AWS?
PDF
O łączeniu Storyblok i Next.js
PDF
Amazon Step Functions. Sposób na implementację procesów w chmurze
PDF
Od Figmy do gotowej aplikacji bez linijki kodu
Jak kraść miliony, czyli o błędach bezpieczeństwa, które mogą spotkać również...
Uszanowanko Podsumowanko
Jak efektywnie podejść do certyfikacji w AWS?
O co chodzi z tą dostępnością cyfrową?
Chat tekstowy z użyciem Amazon Chime
Migracje danych serverless
Jak nie zwariować z architekturą Serverless?
Analiza semantyczna artykułów prasowych w 5 sprintów z użyciem AWS
Feature flags na ratunek projektu w JavaScript
Typowanie nominalne w TypeScript
Automatyzacja tworzenia frontendu z wykorzystaniem GraphQL
Serverless Compose vs hurtownia danych
Testy API: połączenie z bazą danych czy implementacja w pamięci
Jak skutecznie read model. Case study
Firestore czyli ognista baza od giganta z Doliny Krzemowej
Jak utrzymać stado Lambd w ryzach
Jak poskromić AWS?
O łączeniu Storyblok i Next.js
Amazon Step Functions. Sposób na implementację procesów w chmurze
Od Figmy do gotowej aplikacji bez linijki kodu

Recently uploaded (20)

PPTX
1. Introduction to Computer Programming.pptx
PDF
Accuracy of neural networks in brain wave diagnosis of schizophrenia
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
NewMind AI Weekly Chronicles - August'25-Week II
PPT
Teaching material agriculture food technology
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PPTX
OMC Textile Division Presentation 2021.pptx
PDF
Univ-Connecticut-ChatGPT-Presentaion.pdf
PDF
Mushroom cultivation and it's methods.pdf
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PPTX
Spectroscopy.pptx food analysis technology
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
A comparative study of natural language inference in Swahili using monolingua...
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PPTX
Tartificialntelligence_presentation.pptx
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
1. Introduction to Computer Programming.pptx
Accuracy of neural networks in brain wave diagnosis of schizophrenia
Mobile App Security Testing_ A Comprehensive Guide.pdf
NewMind AI Weekly Chronicles - August'25-Week II
Teaching material agriculture food technology
MIND Revenue Release Quarter 2 2025 Press Release
OMC Textile Division Presentation 2021.pptx
Univ-Connecticut-ChatGPT-Presentaion.pdf
Mushroom cultivation and it's methods.pdf
Per capita expenditure prediction using model stacking based on satellite ima...
Spectroscopy.pptx food analysis technology
Reach Out and Touch Someone: Haptics and Empathic Computing
Unlocking AI with Model Context Protocol (MCP)
gpt5_lecture_notes_comprehensive_20250812015547.pdf
Encapsulation_ Review paper, used for researhc scholars
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
A comparative study of natural language inference in Swahili using monolingua...
Diabetes mellitus diagnosis method based random forest with bat algorithm
Tartificialntelligence_presentation.pptx
Build a system with the filesystem maintained by OSTree @ COSCUP 2025

BDD vs Behat