SlideShare une entreprise Scribd logo
1  sur  26
Télécharger pour lire hors ligne
BDD SYMFONY TN
rmed19
SLIDE 1
1
BDD 
&
   SYMFONY
BDD SYMFONY TN
rmed19
SLIDE 2
2
Mohammed
Rhamnia
•
•
•
•
Symfonien depuis 7 ans
Consultant Symfony
@rmed19
http://medrhamnia.workpress.com
BDD SYMFONY TN
rmed19
SLIDE 3
3
DEFINE
BDD
Introduction au Behaviour Driven
Development
BDD SYMFONY TN
rmed19
SLIDE 4
4
ÉCHECD'UN
PROJET
•
•
•
•
•
•
Retard de livraison
Coûts de finalisation élevés
Application ne répond pas au besoin
Instabilité après déploiement
Non respect des règles
Code non réutilisable
BDD SYMFONY TN
rmed19
SLIDE 5
5
•
•
•
•
•
Répondre au besoin
S'adapter au changement de priorité
Diminuer le coût de changement
Se focaliser sur les fonctionnalités à forte
valeur ajoutée
S'adapter au feedback
RÉUSSITE
D'UN
PROJET
BDD SYMFONY TN
rmed19
SLIDE 6
6
AUCOMMENCEMENT
ÉTAITLETDD,ETLETDD
ÉTAITAVECEXP
BDD SYMFONY TN
rmed19
SLIDE 7
7
Test Driven Development
BDD SYMFONY TN
rmed19
SLIDE 8
8
•
•
•
•
Complexité
supplémentaire
Impact de la conception
Optimisation continue
Investissement en
temps énormeINCONVENIENTDELATDD
BDD SYMFONY TN
rmed19
SLIDE 9
9
Behaviour-driven development is
about implementing an application
by describing its behaviour from
the perspective of its stakeholders
DAN
    NORTH
BDD SYMFONY TN
rmed19
SLIDE 10
10
BDD est un méthode agile qui
encourage la collaboration entre
les développeurs, les responsables
qualités, les intervenants non-
techniques et les entreprises
participant à un projet de logiciel.
BDD est motivée par la valeur
commerciale, c'est un avantage
pour l'entreprise qui revient une
fois que l'application est en
production.
WIKIPEDIA
BDD SYMFONY TN
rmed19
SLIDE 11
11
PROCESSUS
BDD
•
•
•
Le code créé est à
l’image de la
demande de
l’utilisateur.
La fonctionnalité est
à l’image de la
demande de
l’utilisateur.
Une grande qualité
de production.
•
•
•
On utilise des
phrases, dans la
langue du projet.
On parle de besoin
et non de solution,
dans un langage
non technique.
On utilise des
termes provenant
du langage
omniprésent
partagé par tous.
BDD SYMFONY TN
rmed19
SLIDE 12
12
 
Fonctionnalité 2  
Fonctionnalité
1
 
                                                 
                     
Scénario
2-1
 
Scénario 2-2  
Scénario
1-1
 
Scénario 1-2  
Scénario
1-3
 
BDD ça ressemble à quoi ?
BDD SYMFONY TN
rmed19
SLIDE 13
13
BDD ça ressemble à quoi ?
Feature : Title
As a (En tant que) Contexte
I want (Je souhaite) Fonctionnalité
In order (Pour) Finalité
Scenario : Title (^(can|can not))
Given (Je mets en place un contexte)
When (Je procède à l’action, un événement, …)
Then (Je vérifie)
GHERKIN
BDD SYMFONY TN
rmed19
SLIDE 14
14
BDD ça ressemble à quoi ?
Feature : Managing Blog Posts
As a webmaster
I want I need to be able to create, view, edit or delete a post
In order to manage my blog content
Scenario : I can see all posts
Given I go to "/admin/post" page
Then I should see "Post List"
And I should see "Add Post"
BDD SYMFONY TN
rmed19
SLIDE 15
15
CONCLUANT
•
•
•
•
•
Évolution et non une Révolution.
Tout le monde communique.
Réflexion approfondie.
Documentation testable.
Time is Money.
BDD SYMFONY TN
rmed19
SLIDE 16
16
EXECUTE 
BDD
Passons à l'action
BDD SYMFONY TN
rmed19
SLIDE 17
17
OUTILS
BEHAT MINK
PHSPEC
BDD SYMFONY TN
rmed19
SLIDE 18
18
CONFIGURATION
"require-dev": {
 "sensio/generator-bundle": "~2.3",
 "phpspec/phpspec": "~2.0",
 "behat/behat": "2.4.*@stable",
 "behat/mink": "1.4.*@stable",
 "behat/mink-extension": "*",
"behat/symfony2-extension": "*",
"behat/mink-browserkit-driver": "*",
"behat/mink-selenium2-driver": "*"
 },
BDD SYMFONY TN
rmed19
SLIDE 19
19
CONFIGURATION
#behat.yml
default:
paths:
 features: features
 bootstrap: %behat.paths.features%/bootstrap
extensions: 
BehatMinkExtensionExtension: 
base_url: 'http://sftn.dev/app_dev.php'
default_session: 'symfony2'
BehatSymfony2ExtensionExtension:
mink_driver: true
BDD SYMFONY TN
rmed19
SLIDE 20
20
CONFIGURATION
BDD SYMFONY TN
rmed19
SLIDE 21
21
STORYDDFeature: Managing Blog Posts
In order to manage blog posts
As a blog administrator
I need to be able to create, view, edit or delete posts
Scenario: Listing Blog Posts
Given I go to "/post"
Then I should see "Post List"
And I should see "Add Post"
BDD SYMFONY TN
rmed19
SLIDE 22
22
SPECDD
BDD SYMFONY TN
rmed19
SLIDE 23
23
SPECDD
BDD SYMFONY TN
rmed19
SLIDE 24
24
SPECDD
BDD SYMFONY TN
rmed19
SLIDE 25
25
THEEND
BDD avec Behat, PhpSpec et Symfony2

Contenu connexe

En vedette

Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at WorkGetSmarter
 

En vedette (20)

Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 

BDD avec Behat, PhpSpec et Symfony2