may the feature be with you
TRANSCRIPT
![Page 2: May the feature be with you](https://reader034.vdocuments.fr/reader034/viewer/2022042619/58eeb4af1a28abc22d8b4681/html5/thumbnails/2.jpg)
Behavior Driven Development? ?
?
??
?
![Page 3: May the feature be with you](https://reader034.vdocuments.fr/reader034/viewer/2022042619/58eeb4af1a28abc22d8b4681/html5/thumbnails/3.jpg)
qu’est-ce que c’est ?
➡ Une méthodologie de développement
3
![Page 4: May the feature be with you](https://reader034.vdocuments.fr/reader034/viewer/2022042619/58eeb4af1a28abc22d8b4681/html5/thumbnails/4.jpg)
qu’apporte-t-elle ?
➡ Une meilleure compréhension du besoin
4
BesoinCritères
d’acceptation
Tests d’acceptation
Développement
Equipe métier
Equipe projet
![Page 5: May the feature be with you](https://reader034.vdocuments.fr/reader034/viewer/2022042619/58eeb4af1a28abc22d8b4681/html5/thumbnails/5.jpg)
➡ Un complément au Test Driven Development (TDD)
5
TEST QUI RÉUSSITTESTQUI ÉCHOUE
Refactoring
TDDTest
d’Acceptation
qu’apporte-t-elle ?
![Page 6: May the feature be with you](https://reader034.vdocuments.fr/reader034/viewer/2022042619/58eeb4af1a28abc22d8b4681/html5/thumbnails/6.jpg)
Solutions
![Page 7: May the feature be with you](https://reader034.vdocuments.fr/reader034/viewer/2022042619/58eeb4af1a28abc22d8b4681/html5/thumbnails/7.jpg)
Le Gherkin
7
Given
When
Then
Scenario:Luke succeed to destroy the death star
"Luke" is flying an X-wing
He drops his torpedoes
The death star should be destroyed
Feature: Destroy the death star
![Page 8: May the feature be with you](https://reader034.vdocuments.fr/reader034/viewer/2022042619/58eeb4af1a28abc22d8b4681/html5/thumbnails/8.jpg)
Rebels should be able to win the warAnd
Le Gherkin
7
Given
When
Then
Scenario:Luke succeed to destroy the death star
"Luke" is flying an X-wing
He drops his torpedoes
The death star should be destroyed
And His vessel has torpedoes
Feature: Destroy the death star
![Page 9: May the feature be with you](https://reader034.vdocuments.fr/reader034/viewer/2022042619/58eeb4af1a28abc22d8b4681/html5/thumbnails/9.jpg)
public class RecipeStepdefs { @Given("^\"([^\"]*)\" is flying an X-wing$") public void userIsFlyingAnXwing(String user) throws Throwable { // Your test goes here }
public class RecipeStepdefs { @Given("^\"([^\"]*)\" is flying an X-wing$") public void userIsFlyingAnXwing(String user) throws Throwable { // Your test goes here } @When("^He drops his torpedoes$") public void heDropsHisTorpedeos() throws Throwable { // Your test goes here } @Then(« ^The death star should be destroyed$") public void theDeathStarShouldBeDestroyed() throws Throwable { // Your test goes here }}
Cucumber-jvm
8
![Page 10: May the feature be with you](https://reader034.vdocuments.fr/reader034/viewer/2022042619/58eeb4af1a28abc22d8b4681/html5/thumbnails/10.jpg)
public class RecipeStepdefs { @Given("^\"([^\"]*)\" is flying an X-wing$") public void userIsFlyingAnXwing(String user) throws Throwable { // Your test goes here }
public class RecipeStepdefs { @Given("^\"([^\"]*)\" is flying an X-wing$") public void userIsFlyingAnXwing(String user) throws Throwable { // Your test goes here } @When("^He drops his torpedoes$") public void heDropsHisTorpedeos() throws Throwable { // Your test goes here } @Then(« ^The death star should be destroyed$") public void theDeathStarShouldBeDestroyed() throws Throwable { // Your test goes here }}
Cucumber-jvm
8
Expression régulière
![Page 11: May the feature be with you](https://reader034.vdocuments.fr/reader034/viewer/2022042619/58eeb4af1a28abc22d8b4681/html5/thumbnails/11.jpg)
public class RecipeStepdefs { @Given("^\"([^\"]*)\" is flying an X-wing$") public void userIsFlyingAnXwing(String user) throws Throwable { // Your test goes here }
public class RecipeStepdefs { @Given("^\"([^\"]*)\" is flying an X-wing$") public void userIsFlyingAnXwing(String user) throws Throwable { // Your test goes here } @When("^He drops his torpedoes$") public void heDropsHisTorpedeos() throws Throwable { // Your test goes here } @Then(« ^The death star should be destroyed$") public void theDeathStarShouldBeDestroyed() throws Throwable { // Your test goes here }}
Cucumber-jvm
8
Expression régulière
Given "Luke" is flying an X-wing
![Page 12: May the feature be with you](https://reader034.vdocuments.fr/reader034/viewer/2022042619/58eeb4af1a28abc22d8b4681/html5/thumbnails/12.jpg)
Cucumber-jvm - Java 8
9
public class RecipeJava8Stepdefs implements En { public RecipeJava8Stepdefs() { Given("^\"([^\"]*)\" is flying an X-wing$", () -> { // Your test goes here }); When("^He drops his torpedoes$", () -> { // Your test goes here }); Then(« ^The death star should be destroyed$", () -> { // Your test goes here }); }}
![Page 13: May the feature be with you](https://reader034.vdocuments.fr/reader034/viewer/2022042619/58eeb4af1a28abc22d8b4681/html5/thumbnails/13.jpg)
i18n ?
raaaaaahhgh uughghhhgh aaaaahnr
uughghhhgh awwgggghhh wuuh*
*Je ne comprends pas ce que tu dis
![Page 14: May the feature be with you](https://reader034.vdocuments.fr/reader034/viewer/2022042619/58eeb4af1a28abc22d8b4681/html5/thumbnails/14.jpg)
# language: fr
11
# language: frFonctionnalité: Faire une course de racer En tant que pilote Je souhaite participer à une course Afin de gagnerScénario: Je participer à une course Etant donné que "Luke" a un module de course Lorsqu’il participe à la course Alors il gagne
![Page 15: May the feature be with you](https://reader034.vdocuments.fr/reader034/viewer/2022042619/58eeb4af1a28abc22d8b4681/html5/thumbnails/15.jpg)
implémentation
12
@Etantdonné("^que \"([^\"]*)\" a un module de course$") public void queAUnModuleDeCourse(String personnage) throws Throwable { // TODO } @Lorsqu("^il participe à la course$") public void ilParticipeALaCourse() throws Throwable { // TODO} @Alors("^il gagne$") public void ilGagne() throws Throwable { // TODO}
![Page 16: May the feature be with you](https://reader034.vdocuments.fr/reader034/viewer/2022042619/58eeb4af1a28abc22d8b4681/html5/thumbnails/16.jpg)
Teach me the force
![Page 17: May the feature be with you](https://reader034.vdocuments.fr/reader034/viewer/2022042619/58eeb4af1a28abc22d8b4681/html5/thumbnails/17.jpg)
Mais le BDD, ça fonctionne vraiment ?
![Page 18: May the feature be with you](https://reader034.vdocuments.fr/reader034/viewer/2022042619/58eeb4af1a28abc22d8b4681/html5/thumbnails/18.jpg)
Pour aller plus loin…
![Page 19: May the feature be with you](https://reader034.vdocuments.fr/reader034/viewer/2022042619/58eeb4af1a28abc22d8b4681/html5/thumbnails/19.jpg)
Référenceshttp://dannorth.net/introducing-bdd/ http://blog.viseo-bt.com/as-viseo-we-went-to-cukeup-so-we-can-improve-our-bdd/ https://cucumber.io https://github.com/sichida/BDD-examples/tree/jug_toulouse https://github.com/cucumber/cucumber/wiki/Spoken-languages http://fr.slideshare.net/ichidashoun/
![Page 20: May the feature be with you](https://reader034.vdocuments.fr/reader034/viewer/2022042619/58eeb4af1a28abc22d8b4681/html5/thumbnails/20.jpg)
Avez-vous des questions
?