SlideShare une entreprise Scribd logo
ALICE ET BOB
Sont sur un bateau.
Développeur Backend en Freelance / Formateur
GABRIEL PILLET / @TENTACODE
RAPPELS
La qualité ?
LA QUALITÉ DU CODE
NOUS SOMMES OBSÉDÉS
PAR LE CODE !
LA QUALITÉ PAS DU CODE
LA QUALITÉ
DES DONNÉES
Quoi ? Comment ? Pourquoi ?
LA QUALITÉ DES DONNÉES PAR LE JEU D’ESSAI
➤ Jeu d’essai, jeu de test, jeu de données

ou « (Data) Fixtures ».
➤ Très peu de théorie sur le sujet. Un bon article de
Matthias Noback : « About Fixtures »

https://matthiasnoback.nl/2018/07/about-fixtures
Alice et Bob sont sur un bateau
« 
locution nominale, masculin→.  [débogage].
Ensemble de données et de conditions de
fonctionnement appliqué à un logiciel à des
fins de test. Le but du... jeu, est de fournir
tous les cas possibles pour tester toutes les
éventualités. En pratique, c'est très
difficile à définir. Synonyme jeu de test.
- http://jargonf.org
JEU D’ESSAI
————————
un jeu d’essai.
NON.
PAREIL.
Alice et Bob sont sur un bateau
« Attention sur le site de démo si tu
cliques à cet endroit ça envoie un vrai
SMS à une vraie personne !
-Un Client Mystère
NON PLUS.
QU’EST-CE QUI FAIT UN
« BON » JEU D’ESSAI ?
LA POLYVALENCE
L’EXHAUSTIVITÉ
Ça c’est eggs haustif 😂
LE VOLUME
LA FACILITÉ
D’UTILISATION
PAR EXEMPLE
Une site de gestion de croisière en ligne.
🛳
Alice et Bob sont sur un bateau
Alice et Bob sont sur un bateau
CAPITAINE MERRILL STUBING
Le capitaine Stubing a
55 ans et travaille pour
La Croisière s’amuse
depuis 10 ans.
Il utilise le site
principalement pour
télécharger ses fiches
de paye, voir le
planning des croisières
et le listing du
personnel.
RICK MARTIN
Passager d’une
croisière, il a fait une
réservation et à laissé
un avis négatif après
son séjour.
★☆☆☆☆
« On m’avait promis
l’amour et tout ce que
j’ai eu c’est mal au
coeur tout le trajet. 🤢 »
PACIFIC PRINCESS
Le Pacific Princess est
un navire propice à
l'intimité avec ses 670
invités à bord, et veut
vous offrir des
sensations
extraordinaires.
Et, avec 200 cabines
équipées d'un balcon,
vous ne raterez pas les
levers de soleils.
TRAVERSÉE DE L’OCÉAN
Croisière au départ de
New-York et arrivée à
Douvres.
Durée de la croisière 31
jours.
Escales à Halifax,
Reykjavik, Isafjordur,
Akureyri, Torshafen,
Lerwick, Longyearbyen,
Trondheim,
AlesundSkjolden
et Haugesund.
« En tant qu’utilisateur ayant
voyagé sur une croisière
Je peux déposer un avis
utilisateur.
« Rick Martin a voyagé sur la
croisière « Traversée de
l’océan ».
Il a été déçu du voyage et a
laissé un avis négatif.
PENDANT LE DÉVELOPPEMENT
➤ On ajoute si besoin les fixtures nécessaires pour
tester la fonctionnalités à développer.
➤ On code.
➤ On ajoute un test fonctionnel (se basant sur le
jeu d’essai).
➤ Éventuellement on complète les fixtures.
C’EST SUPER SIMPLE !
(NON)
Le polymorphisme des données
Alice et Bob sont sur un bateau
Alice et Bob sont sur un bateau
DU CODE !
C’est pas trop tôt !
COMPOSER REQUIRE NELMIO/ALICE
FIXTURES.YML
SRC/FIXTURES/BOAT.PHP
SRC/COMMAND/LOADFIXTURESCOMMAND.PHP
SRC/COMMAND/LOADFIXTURESCOMMAND.PHP
LES RÉFÉRENCES
LES RÉFÉRENCES
FAKER - HTTPS://GITHUB.COM/FZANINOTTO/FAKER
Alice et Bob sont sur un bateau
Alice et Bob sont sur un bateau
VOLUME
SEED + LANGUE
LES PROVIDERS
Alice et Bob sont sur un bateau
LES PROVIDERS
FAITES DES SCRIPTS ! (MAKEFILE, CONSOLE, BASH…)
➤ Faire une commande `make fixtures` pour regénérer les
données.
➤ Faire une commande `make fixtures-cache` pour les mettre
en cache.
➤ Faire une commande `make fixtures-load-cache` pour
regénérer les données depuis le cache.
Alice et Bob sont sur un bateau

Contenu connexe

En vedette

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
Marius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
Expeed Software
 
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
Pixeldarts
 
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
ThinkNow
 
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
marketingartwork
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
Skeleton Technologies
 
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
Neil 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 2024
Albert 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 Insights
Kurio // 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 2024
Search 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 summary
SpeakerHub
 
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 Intent
Lily Ray
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
Rajiv Jayarajah, MAppComm, ACC
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
Christy Abraham Joy
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
Vit 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 management
MindGenius
 
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
 

En vedette (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
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...
 

Alice et Bob sont sur un bateau