SlideShare a Scribd company logo
1 of 45
Download to read offline
2
Behavior Driven Development
&
Specification by Examples
with
@aloyer
1. testing new functionalities
2. non-regression testing
3. having conversation
4. writing scenario and automating it
5. using Cucumber/Specflow
6. other…
O
For You what is BDD About?
3@aloyer
Exercise: Draw a 12 points Star
@aloyer 4
Exercise: Draw a 12 points Star
@aloyer 5
Q12
Q10
Q14
J
@aloyer 6
shared understanding
@jeffpatton
Shared documents
aren’t
C LN
❝
Exercise: Chess moves
@aloyer 7
Specify the Knight movement rules
https://en.wikipedia.org/wiki/Rules_of_chess#Basic_moves
j
Exercise: Chess moves
@aloyer 8
A knight moves to the nearest square not on the
same rank, file, or diagonal.
https://en.wikipedia.org/wiki/Rules_of_chess#Basic_moves // https://en.wikipedia.org/wiki/Knight_(chess)
❝
j
Exercise: Chess moves
@aloyer 9
File
A column of the chessboard. A specific
file can be named either using its
position in algebraic notation, a–h, or
by using its position in descriptive
notation.
For example, the f-file or the king
bishop file comprises the squares f1–f8
(or KB1–KB8 in descriptive notation)
https://en.wikipedia.org/wiki/Glossary_of_chess#Rank
Rank
A row of the chessboard. In algebraic
notation, ranks are numbered 1–8
starting from White's side of the board;
however, players customarily refer to
ranks (but not files) from their own
perspectives.
For example: White's king and other
pieces start on his first (or "back") rank,
whereas Black calls the same rank the
eighth rank;
j
Exercise: Chess moves
@aloyer 10
Specify the Knight movement rules
https://en.wikipedia.org/wiki/Rules_of_chess#Basic_moves
jProvide some real examples ?
Exercise: Chess moves
@aloyer 11
j
a b c d e f g h
1
2
3
4
5
6
7
8
+
+
+
+ +
+
+
+
j
Given a Knight located at d4
Then the Knight should be able to move to:
b3, c2, b5, c6, e2, f3, e6, f5
Exercise: Chess moves
@aloyer 12
j
a b c d e f g h
1
2
3
4
5
6
7
8
+
+
+
+ +
+
+
+
j
Given a Knight located at d4
Then the Knight should be able to move to:
b3, c2, b5, c6, e2, f3, e6, f5
Do you need a valid game
setup to check this rule?
What would make impossible
the Knight to go to those
locations?
Deliberate Discovery
Exercise: Chess moves
@aloyer 13
j
a b c d e f g h
1
2
3
4
5
6
7
8
+
+
+
+ +
+
+
+
j
l n
l
Given a Knight located at d4
And a King located at c3
And …
When the Knight attempts to move to f5
Then …
Exercise: Chess moves
@aloyer 14
j
a b c d e f g h
1
2
3
4
5
6
7
8
+
+
+
+ +
+
+
+
jGiven a Knight located at d4
And a King located at c3
And …
When the Knight attempts to move to f5
Then …
l n
l
thewhite
white
Exercise: Chess moves
@aloyer 15
j
a b c d e f g h
1
2
3
4
5
6
7
8
+
+
+
+ +
+
+
+
j
Given the board c3, d4, e7, g7
When the move d4-f5 is attempted
Then …
l n
lBusiness Language
e.g. Algebraic chess notation
Exercise: Chess moves
@aloyer 16
j
a b c d e f g h
1
2
3
4
5
6
7
8
+
+
+
+ +
+
+
+
j
Given the following board
-- -- -- -- -- -- -- --
-- -- -- -- bK -- bB --
-- -- -- -- -- -- -- --
-- -- -- -- -- -- -- --
-- -- -- wN -- -- -- --
-- -- wK -- -- -- -- --
-- -- -- -- -- -- -- --
-- -- -- -- -- -- -- --
When … l n
lBusiness Language
e.g. Dedicated DSL
Exercise: Chess moves
@aloyer 17
A knight moves to the nearest square not on the
same rank, file, or diagonal.
https://en.wikipedia.org/wiki/Rules_of_chess#Basic_moves // https://en.wikipedia.org/wiki/Knight_(chess)
❝
j
Given a Knight located at d4
Then the Knight should be able to move to:
b3, c2, b5, c6, e2, f3, e6, f5
Rule
Example
~ Acceptance
Criteria
and discover unknowns
@aloyer 18
Having conversations with domain experts
and using examples
to gain a shared understanding of the desired behavior
to gain a shared understanding of the desired behavior
and discover unknowns
@aloyer 19
Having conversations with domain experts
but
conversations only
are not enough
Curse of Knowledge
B E
?
?
?☃
℥
http://www.nytimes.com/2007/12/30/business/30know.html?_r=1&
and discover unknowns
@aloyer 20
Having conversations with domain experts
and using examples
to gain a shared understanding of the desired behavior
Curse of Knowledge
and discover unknowns
@aloyer 21
Having conversations with domain experts
and using examples
to gain a shared understanding of the desired behavior
and discover unknowns
@aloyer 22
Having conversations with domain experts
and using examples
to gain a shared understanding of the desired behavior
Ubiquitous Language
and discover unknowns
@aloyer 23
Having conversations with domain experts
and using examples
to gain a shared understanding of the desired behavior
Ubiquitous Language
Hunt for rules and
acceptance criteria
@aloyer 24
Exercise: Permissions Inheritance
Files and subfolders can inherit permissions from a parent folder. By default,
any new permissions you assign to a folder are passed on to subfolders as
well. Thus, when you create a new subfolder in your My Documents folder, it
inherits the permissions you've set for your profile. If you made your user profile
private, the new subfolder and any files you create or store within it will be private
as well.
You can prevent permissions from being inherited by changing the
inheritance options for a folder. You can specify that subfolders or files (or
both) no longer inherit permissions that have been assigned to the parent
folder containing them. Instead, only permissions you explicitly apply to files
and subfolders will apply.
@aloyer 25
Exercise: Password Rules
List Sesame Rules
Examples?
and discover unknowns
@aloyer 26
Having conversations with domain experts
and using examples
to gain a shared understanding of the desired behavior
and discover unknowns
@aloyer 27
Having conversations with domain experts
and using examples
to gain a shared understanding of the desired behavior
and discover unknowns
@aloyer 28
Having conversations with domain experts
and using examples
to gain a shared understanding of the desired behavior
conversation patterns
How
@aloyer 29
Why
What/Intent
Rules for the conversation
five why rules
Tips
Tips
@aloyer 30https://pragprog.com/magazines/2012-01/the-dude-abides
@aloyer 31
tap
.
I
deliver running water
hand
wash hands
What do I want? Why?Not how I’ll perform it
Describe the task not the function
Tips
@aloyer 32
.
I
What do I want? Why?Not how I’ll perform it
Describe the task not the function
In order to really appreciate my meal
As a sea food eater
I want to wash my hands afterwards
Tips
@aloyer 33
.
I
What do I want? Why?Not how I’ll perform it
Describe the task not the function
In order to really appreciate my meal
As a sea food eater
I want to wash my hands afterwards
In order to <achieve a vision/goal>
As a <stakeholder>
I want to <value>
Tips
@aloyer 34
Given-When-Then
Then an outcome should be observed
Given a context
When an event happens
3 phases
setup/arrange
exercise/act
verify/assert
Tips
@aloyer 35
Given-When-Then
Then an outcome should be observed
Given a context
When an event happens
3 phases
setup/arrange
exercise/act
verify/assert
behavior
Tips
@aloyer 36
Given-When-Then
Then an outcome should be observed
Given a context
When an event happens
3 phases
Business Language Only!!!
Tips
@aloyer 37
Exercise: Scenario Analysis
Scenario: A visitor can add an item to the basket
Given I am viewing a product "product/id/1"
When I click "#addNowButton"
Then I should see "Items added to basket"
what do you think ?
Tips
@aloyer 38
Scenario: A visitor can add an item to the basket
Given I am viewing a product "product/id/1"
When I click "#addNowButton"
Then I should see "Items added to basket"
Exercise: Scenario Analysis
???
authenticated
anonymous…
website? api? web-services?
technical details?
technical details?
Tips
@aloyer 39
In order to ease buying
As a visitor
I want to be able to add item in my basket
Scenario: A non authenticated visitor can add item to its basket
Given I was not yet authenticated
And I had no item in my basket
And I was looking at the book « Living Documentation »
When I add the book in my basket
Then my basket should contain the book « Living Documentation »
Scenario: A visitor can add an item to the basket
Given I am viewing a product "product/id/1"
When I click "#addNowButton"
Then I should see "Items added to basket"
Exercise: Scenario Analysis
only
1st…
2nd…
3rd…
nth draft
Tips
@aloyer 40
In order to ease buying
As a visitor
I want to be able to add item in my basket
Scenario: A non authenticated visitor can add item to its basket
Given I was not yet authenticated
And I had no item in my basket
And I was looking at the book « Living Documentation »
When I add the book in my basket
Then my basket should contain the book « Living Documentation »
Exercise: Scenario Analysis
only
there is already something in the basket
the book was already in the basket
it is the second time i visit the site anonymously…
a book was in the basket but not anymore available…
what if?
Tips
@aloyer 41
Scenario: A non authenticated visitor can add item to its basket
Given I was not yet authenticated
And I had no item in my basket
And I was looking at the book « Living Documentation »
When I add the book in my basket
Then my basket should contain only the book « Living Documentation »
Scenario: An authenticated visitor can add item to its basket
Given I was already authenticated as « Emma »
And I had no item in my basket
And I was looking at the book « Living Documentation »
When I add the book in my basket
Then my basket should contain only the book « Living Documentation »
Exercise: Scenario Analysis
Tips
How
@aloyer 42
Why
What/Intent
What if…?
use Should
Business Language only
Always assume you’re ignorant
Provide a context for your use-case
Rules for the conversation
Tips
Tips
C QExamples
L
O
A P
L
LLRequirements
N
3 Amigos
Workshop
development
/ tests
uat
@aloyer 43
when
http://yellowpencil.com/blog/testing-testing-1-2-3/ @aloyer 44
http://www.isixsigma.com/industries/software-it/defect-prevention-reducing-costs-and-enhancing-quality/
Relative Costs to Fix Software Defects
(Source: IBM Systems Sciences Institute)
autom
ation
Exam
ples
Tests
Requirements
elaborate
can become
verify
@aloyer 45
autom
ation
Three Amigos
Specifications
Requirements
Validate
Examples Development
Automation Living
Documentation
Examples
Validation
Non-Regression
Right Software
@aloyer 46

More Related Content

Viewers also liked

Behavior driven development. Testing drupal using behat
Behavior driven development. Testing drupal using behatBehavior driven development. Testing drupal using behat
Behavior driven development. Testing drupal using behatAndrei Jechiu
 
Building the "right" regression suite using Behavior Driven Testing (BDT)
Building the "right" regression suite using Behavior Driven Testing (BDT)Building the "right" regression suite using Behavior Driven Testing (BDT)
Building the "right" regression suite using Behavior Driven Testing (BDT)Anand Bagmar
 
Behavior Driven Testing for Multichannel Enterprise Applications
Behavior Driven Testing for Multichannel Enterprise ApplicationsBehavior Driven Testing for Multichannel Enterprise Applications
Behavior Driven Testing for Multichannel Enterprise ApplicationsBamdad Dashtban
 
Behavior Driven Testing of Web Services
Behavior Driven Testing of Web ServicesBehavior Driven Testing of Web Services
Behavior Driven Testing of Web ServicesSurya Sreedevi Vedula
 
Behavior Driven Development with Rails
Behavior Driven Development with RailsBehavior Driven Development with Rails
Behavior Driven Development with RailsMark Menard
 
Startup Institute: JS Testing & Behavior Driven Development
Startup Institute: JS Testing & Behavior Driven DevelopmentStartup Institute: JS Testing & Behavior Driven Development
Startup Institute: JS Testing & Behavior Driven DevelopmentConor Sheehan
 
BDD / cucumber /Capybara
BDD / cucumber /CapybaraBDD / cucumber /Capybara
BDD / cucumber /CapybaraShraddhaSF
 
Behavior Driven Testing - A paradigm shift
Behavior Driven Testing - A paradigm shiftBehavior Driven Testing - A paradigm shift
Behavior Driven Testing - A paradigm shiftAspire Systems
 
[Agile Testing Day] Behavior Driven Development (BDD)
[Agile Testing Day] Behavior Driven Development (BDD)[Agile Testing Day] Behavior Driven Development (BDD)
[Agile Testing Day] Behavior Driven Development (BDD)Cellenza
 
Natural Language UI Testing using Behavior Driven Development with Pavlov and...
Natural Language UI Testing using Behavior Driven Development with Pavlov and...Natural Language UI Testing using Behavior Driven Development with Pavlov and...
Natural Language UI Testing using Behavior Driven Development with Pavlov and...Eric DeLabar
 
iOS Behavior-Driven Development
iOS Behavior-Driven DevelopmentiOS Behavior-Driven Development
iOS Behavior-Driven DevelopmentBrian Gesiak
 
Behavior Driven Development
Behavior Driven DevelopmentBehavior Driven Development
Behavior Driven DevelopmentMarakana Inc.
 
Behavior Driven Development - agile testing day
Behavior Driven Development - agile testing dayBehavior Driven Development - agile testing day
Behavior Driven Development - agile testing dayGeorges Damien
 
Test driven development vs Behavior driven development
Test driven development vs Behavior driven developmentTest driven development vs Behavior driven development
Test driven development vs Behavior driven developmentGallop Solutions
 
Behavior driven development - Deliver Value by Collaboration
Behavior driven development - Deliver Value by CollaborationBehavior driven development - Deliver Value by Collaboration
Behavior driven development - Deliver Value by CollaborationNaveen Kumar Singh
 
Behavior Driven Development & Testing Introduction
Behavior Driven Development & Testing IntroductionBehavior Driven Development & Testing Introduction
Behavior Driven Development & Testing IntroductionChristian Jantz
 

Viewers also liked (20)

Calabash
CalabashCalabash
Calabash
 
Behavior Driven Development
Behavior Driven DevelopmentBehavior Driven Development
Behavior Driven Development
 
Behavior driven development. Testing drupal using behat
Behavior driven development. Testing drupal using behatBehavior driven development. Testing drupal using behat
Behavior driven development. Testing drupal using behat
 
Building the "right" regression suite using Behavior Driven Testing (BDT)
Building the "right" regression suite using Behavior Driven Testing (BDT)Building the "right" regression suite using Behavior Driven Testing (BDT)
Building the "right" regression suite using Behavior Driven Testing (BDT)
 
Behavior Driven Testing for Multichannel Enterprise Applications
Behavior Driven Testing for Multichannel Enterprise ApplicationsBehavior Driven Testing for Multichannel Enterprise Applications
Behavior Driven Testing for Multichannel Enterprise Applications
 
Behavior Driven Testing of Web Services
Behavior Driven Testing of Web ServicesBehavior Driven Testing of Web Services
Behavior Driven Testing of Web Services
 
Behavior Driven Development with Rails
Behavior Driven Development with RailsBehavior Driven Development with Rails
Behavior Driven Development with Rails
 
Startup Institute: JS Testing & Behavior Driven Development
Startup Institute: JS Testing & Behavior Driven DevelopmentStartup Institute: JS Testing & Behavior Driven Development
Startup Institute: JS Testing & Behavior Driven Development
 
BDD / cucumber /Capybara
BDD / cucumber /CapybaraBDD / cucumber /Capybara
BDD / cucumber /Capybara
 
Behavior Driven Testing - A paradigm shift
Behavior Driven Testing - A paradigm shiftBehavior Driven Testing - A paradigm shift
Behavior Driven Testing - A paradigm shift
 
[Agile Testing Day] Behavior Driven Development (BDD)
[Agile Testing Day] Behavior Driven Development (BDD)[Agile Testing Day] Behavior Driven Development (BDD)
[Agile Testing Day] Behavior Driven Development (BDD)
 
Natural Language UI Testing using Behavior Driven Development with Pavlov and...
Natural Language UI Testing using Behavior Driven Development with Pavlov and...Natural Language UI Testing using Behavior Driven Development with Pavlov and...
Natural Language UI Testing using Behavior Driven Development with Pavlov and...
 
Behavior Driven Development Testing (BDD)
Behavior Driven Development Testing (BDD)Behavior Driven Development Testing (BDD)
Behavior Driven Development Testing (BDD)
 
Behavior Driven GUI Testing
Behavior Driven GUI TestingBehavior Driven GUI Testing
Behavior Driven GUI Testing
 
iOS Behavior-Driven Development
iOS Behavior-Driven DevelopmentiOS Behavior-Driven Development
iOS Behavior-Driven Development
 
Behavior Driven Development
Behavior Driven DevelopmentBehavior Driven Development
Behavior Driven Development
 
Behavior Driven Development - agile testing day
Behavior Driven Development - agile testing dayBehavior Driven Development - agile testing day
Behavior Driven Development - agile testing day
 
Test driven development vs Behavior driven development
Test driven development vs Behavior driven developmentTest driven development vs Behavior driven development
Test driven development vs Behavior driven development
 
Behavior driven development - Deliver Value by Collaboration
Behavior driven development - Deliver Value by CollaborationBehavior driven development - Deliver Value by Collaboration
Behavior driven development - Deliver Value by Collaboration
 
Behavior Driven Development & Testing Introduction
Behavior Driven Development & Testing IntroductionBehavior Driven Development & Testing Introduction
Behavior Driven Development & Testing Introduction
 

Similar to BDD training v5.0.1

Bdd training v5.2.0 - public
Bdd training   v5.2.0 - publicBdd training   v5.2.0 - public
Bdd training v5.2.0 - publicArnauld Loyer
 
Edutalk w2014
Edutalk w2014Edutalk w2014
Edutalk w2014Mel Chua
 
Quick Library Instruction Assessment Quizzes
Quick Library Instruction Assessment QuizzesQuick Library Instruction Assessment Quizzes
Quick Library Instruction Assessment QuizzesSarah Steiner
 
Castle in the attic webquest
Castle in the attic webquestCastle in the attic webquest
Castle in the attic webquesthhoward01
 
Castle in the attic webquest
Castle in the attic webquestCastle in the attic webquest
Castle in the attic webquesthhoward01
 
Castle in the attic webquest
Castle in the attic webquestCastle in the attic webquest
Castle in the attic webquesthhoward01
 

Similar to BDD training v5.0.1 (6)

Bdd training v5.2.0 - public
Bdd training   v5.2.0 - publicBdd training   v5.2.0 - public
Bdd training v5.2.0 - public
 
Edutalk w2014
Edutalk w2014Edutalk w2014
Edutalk w2014
 
Quick Library Instruction Assessment Quizzes
Quick Library Instruction Assessment QuizzesQuick Library Instruction Assessment Quizzes
Quick Library Instruction Assessment Quizzes
 
Castle in the attic webquest
Castle in the attic webquestCastle in the attic webquest
Castle in the attic webquest
 
Castle in the attic webquest
Castle in the attic webquestCastle in the attic webquest
Castle in the attic webquest
 
Castle in the attic webquest
Castle in the attic webquestCastle in the attic webquest
Castle in the attic webquest
 

More from Arnauld Loyer

Brown Bag Lunch - BDD an introduction - 2017 feb/mar
Brown Bag Lunch - BDD an introduction - 2017 feb/marBrown Bag Lunch - BDD an introduction - 2017 feb/mar
Brown Bag Lunch - BDD an introduction - 2017 feb/marArnauld Loyer
 
Event storming Notes
Event storming NotesEvent storming Notes
Event storming NotesArnauld Loyer
 
BDD - Writing better scenario
BDD - Writing better scenarioBDD - Writing better scenario
BDD - Writing better scenarioArnauld Loyer
 
Nos premiers pas autour du Behavior Driven Development
Nos premiers pas autour du Behavior Driven DevelopmentNos premiers pas autour du Behavior Driven Development
Nos premiers pas autour du Behavior Driven DevelopmentArnauld Loyer
 
Behavior Driven Development // Brown Bag Lunch v1.0.0
Behavior Driven Development // Brown Bag Lunch  v1.0.0Behavior Driven Development // Brown Bag Lunch  v1.0.0
Behavior Driven Development // Brown Bag Lunch v1.0.0Arnauld Loyer
 
Dégraissons le mammouth ou Darwin a encore frappé - La théorie de l'évolution...
Dégraissons le mammouth ou Darwin a encore frappé - La théorie de l'évolution...Dégraissons le mammouth ou Darwin a encore frappé - La théorie de l'évolution...
Dégraissons le mammouth ou Darwin a encore frappé - La théorie de l'évolution...Arnauld Loyer
 
L'ABC du BDD (Behavior Driven Development)
L'ABC du BDD (Behavior Driven Development)L'ABC du BDD (Behavior Driven Development)
L'ABC du BDD (Behavior Driven Development)Arnauld Loyer
 
Confiance&bdd softshake2013
Confiance&bdd softshake2013Confiance&bdd softshake2013
Confiance&bdd softshake2013Arnauld Loyer
 

More from Arnauld Loyer (10)

Brown Bag Lunch - BDD an introduction - 2017 feb/mar
Brown Bag Lunch - BDD an introduction - 2017 feb/marBrown Bag Lunch - BDD an introduction - 2017 feb/mar
Brown Bag Lunch - BDD an introduction - 2017 feb/mar
 
Event storming Notes
Event storming NotesEvent storming Notes
Event storming Notes
 
BDD - Writing better scenario
BDD - Writing better scenarioBDD - Writing better scenario
BDD - Writing better scenario
 
Nos premiers pas autour du Behavior Driven Development
Nos premiers pas autour du Behavior Driven DevelopmentNos premiers pas autour du Behavior Driven Development
Nos premiers pas autour du Behavior Driven Development
 
Behavior Driven Development // Brown Bag Lunch v1.0.0
Behavior Driven Development // Brown Bag Lunch  v1.0.0Behavior Driven Development // Brown Bag Lunch  v1.0.0
Behavior Driven Development // Brown Bag Lunch v1.0.0
 
Dégraissons le mammouth ou Darwin a encore frappé - La théorie de l'évolution...
Dégraissons le mammouth ou Darwin a encore frappé - La théorie de l'évolution...Dégraissons le mammouth ou Darwin a encore frappé - La théorie de l'évolution...
Dégraissons le mammouth ou Darwin a encore frappé - La théorie de l'évolution...
 
L'ABC du BDD (Behavior Driven Development)
L'ABC du BDD (Behavior Driven Development)L'ABC du BDD (Behavior Driven Development)
L'ABC du BDD (Behavior Driven Development)
 
Confiance&bdd softshake2013
Confiance&bdd softshake2013Confiance&bdd softshake2013
Confiance&bdd softshake2013
 
Bdd training - v3
Bdd training - v3Bdd training - v3
Bdd training - v3
 
Bdd training-v1
Bdd training-v1Bdd training-v1
Bdd training-v1
 

Recently uploaded

Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfngoud9212
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsHyundai Motor Group
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsPrecisely
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDGMarianaLemus7
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Neo4j
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 

Recently uploaded (20)

Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdf
 
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power Systems
 
The transition to renewables in India.pdf
The transition to renewables in India.pdfThe transition to renewables in India.pdf
The transition to renewables in India.pdf
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDG
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 

BDD training v5.0.1

  • 2. 1. testing new functionalities 2. non-regression testing 3. having conversation 4. writing scenario and automating it 5. using Cucumber/Specflow 6. other… O For You what is BDD About? 3@aloyer
  • 3. Exercise: Draw a 12 points Star @aloyer 4
  • 4. Exercise: Draw a 12 points Star @aloyer 5 Q12 Q10 Q14 J
  • 6. Exercise: Chess moves @aloyer 7 Specify the Knight movement rules https://en.wikipedia.org/wiki/Rules_of_chess#Basic_moves j
  • 7. Exercise: Chess moves @aloyer 8 A knight moves to the nearest square not on the same rank, file, or diagonal. https://en.wikipedia.org/wiki/Rules_of_chess#Basic_moves // https://en.wikipedia.org/wiki/Knight_(chess) ❝ j
  • 8. Exercise: Chess moves @aloyer 9 File A column of the chessboard. A specific file can be named either using its position in algebraic notation, a–h, or by using its position in descriptive notation. For example, the f-file or the king bishop file comprises the squares f1–f8 (or KB1–KB8 in descriptive notation) https://en.wikipedia.org/wiki/Glossary_of_chess#Rank Rank A row of the chessboard. In algebraic notation, ranks are numbered 1–8 starting from White's side of the board; however, players customarily refer to ranks (but not files) from their own perspectives. For example: White's king and other pieces start on his first (or "back") rank, whereas Black calls the same rank the eighth rank; j
  • 9. Exercise: Chess moves @aloyer 10 Specify the Knight movement rules https://en.wikipedia.org/wiki/Rules_of_chess#Basic_moves jProvide some real examples ?
  • 10. Exercise: Chess moves @aloyer 11 j a b c d e f g h 1 2 3 4 5 6 7 8 + + + + + + + + j Given a Knight located at d4 Then the Knight should be able to move to: b3, c2, b5, c6, e2, f3, e6, f5
  • 11. Exercise: Chess moves @aloyer 12 j a b c d e f g h 1 2 3 4 5 6 7 8 + + + + + + + + j Given a Knight located at d4 Then the Knight should be able to move to: b3, c2, b5, c6, e2, f3, e6, f5 Do you need a valid game setup to check this rule? What would make impossible the Knight to go to those locations? Deliberate Discovery
  • 12. Exercise: Chess moves @aloyer 13 j a b c d e f g h 1 2 3 4 5 6 7 8 + + + + + + + + j l n l Given a Knight located at d4 And a King located at c3 And … When the Knight attempts to move to f5 Then …
  • 13. Exercise: Chess moves @aloyer 14 j a b c d e f g h 1 2 3 4 5 6 7 8 + + + + + + + + jGiven a Knight located at d4 And a King located at c3 And … When the Knight attempts to move to f5 Then … l n l thewhite white
  • 14. Exercise: Chess moves @aloyer 15 j a b c d e f g h 1 2 3 4 5 6 7 8 + + + + + + + + j Given the board c3, d4, e7, g7 When the move d4-f5 is attempted Then … l n lBusiness Language e.g. Algebraic chess notation
  • 15. Exercise: Chess moves @aloyer 16 j a b c d e f g h 1 2 3 4 5 6 7 8 + + + + + + + + j Given the following board -- -- -- -- -- -- -- -- -- -- -- -- bK -- bB -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- wN -- -- -- -- -- -- wK -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- When … l n lBusiness Language e.g. Dedicated DSL
  • 16. Exercise: Chess moves @aloyer 17 A knight moves to the nearest square not on the same rank, file, or diagonal. https://en.wikipedia.org/wiki/Rules_of_chess#Basic_moves // https://en.wikipedia.org/wiki/Knight_(chess) ❝ j Given a Knight located at d4 Then the Knight should be able to move to: b3, c2, b5, c6, e2, f3, e6, f5 Rule Example ~ Acceptance Criteria
  • 17. and discover unknowns @aloyer 18 Having conversations with domain experts and using examples to gain a shared understanding of the desired behavior
  • 18. to gain a shared understanding of the desired behavior and discover unknowns @aloyer 19 Having conversations with domain experts but conversations only are not enough Curse of Knowledge B E ? ? ?☃ ℥ http://www.nytimes.com/2007/12/30/business/30know.html?_r=1&
  • 19. and discover unknowns @aloyer 20 Having conversations with domain experts and using examples to gain a shared understanding of the desired behavior Curse of Knowledge
  • 20. and discover unknowns @aloyer 21 Having conversations with domain experts and using examples to gain a shared understanding of the desired behavior
  • 21. and discover unknowns @aloyer 22 Having conversations with domain experts and using examples to gain a shared understanding of the desired behavior Ubiquitous Language
  • 22. and discover unknowns @aloyer 23 Having conversations with domain experts and using examples to gain a shared understanding of the desired behavior Ubiquitous Language Hunt for rules and acceptance criteria
  • 23. @aloyer 24 Exercise: Permissions Inheritance Files and subfolders can inherit permissions from a parent folder. By default, any new permissions you assign to a folder are passed on to subfolders as well. Thus, when you create a new subfolder in your My Documents folder, it inherits the permissions you've set for your profile. If you made your user profile private, the new subfolder and any files you create or store within it will be private as well. You can prevent permissions from being inherited by changing the inheritance options for a folder. You can specify that subfolders or files (or both) no longer inherit permissions that have been assigned to the parent folder containing them. Instead, only permissions you explicitly apply to files and subfolders will apply.
  • 24. @aloyer 25 Exercise: Password Rules List Sesame Rules Examples?
  • 25. and discover unknowns @aloyer 26 Having conversations with domain experts and using examples to gain a shared understanding of the desired behavior
  • 26. and discover unknowns @aloyer 27 Having conversations with domain experts and using examples to gain a shared understanding of the desired behavior
  • 27. and discover unknowns @aloyer 28 Having conversations with domain experts and using examples to gain a shared understanding of the desired behavior conversation patterns
  • 28. How @aloyer 29 Why What/Intent Rules for the conversation five why rules Tips Tips
  • 30. @aloyer 31 tap . I deliver running water hand wash hands What do I want? Why?Not how I’ll perform it Describe the task not the function Tips
  • 31. @aloyer 32 . I What do I want? Why?Not how I’ll perform it Describe the task not the function In order to really appreciate my meal As a sea food eater I want to wash my hands afterwards Tips
  • 32. @aloyer 33 . I What do I want? Why?Not how I’ll perform it Describe the task not the function In order to really appreciate my meal As a sea food eater I want to wash my hands afterwards In order to <achieve a vision/goal> As a <stakeholder> I want to <value> Tips
  • 33. @aloyer 34 Given-When-Then Then an outcome should be observed Given a context When an event happens 3 phases setup/arrange exercise/act verify/assert Tips
  • 34. @aloyer 35 Given-When-Then Then an outcome should be observed Given a context When an event happens 3 phases setup/arrange exercise/act verify/assert behavior Tips
  • 35. @aloyer 36 Given-When-Then Then an outcome should be observed Given a context When an event happens 3 phases Business Language Only!!! Tips
  • 36. @aloyer 37 Exercise: Scenario Analysis Scenario: A visitor can add an item to the basket Given I am viewing a product "product/id/1" When I click "#addNowButton" Then I should see "Items added to basket" what do you think ? Tips
  • 37. @aloyer 38 Scenario: A visitor can add an item to the basket Given I am viewing a product "product/id/1" When I click "#addNowButton" Then I should see "Items added to basket" Exercise: Scenario Analysis ??? authenticated anonymous… website? api? web-services? technical details? technical details? Tips
  • 38. @aloyer 39 In order to ease buying As a visitor I want to be able to add item in my basket Scenario: A non authenticated visitor can add item to its basket Given I was not yet authenticated And I had no item in my basket And I was looking at the book « Living Documentation » When I add the book in my basket Then my basket should contain the book « Living Documentation » Scenario: A visitor can add an item to the basket Given I am viewing a product "product/id/1" When I click "#addNowButton" Then I should see "Items added to basket" Exercise: Scenario Analysis only 1st… 2nd… 3rd… nth draft Tips
  • 39. @aloyer 40 In order to ease buying As a visitor I want to be able to add item in my basket Scenario: A non authenticated visitor can add item to its basket Given I was not yet authenticated And I had no item in my basket And I was looking at the book « Living Documentation » When I add the book in my basket Then my basket should contain the book « Living Documentation » Exercise: Scenario Analysis only there is already something in the basket the book was already in the basket it is the second time i visit the site anonymously… a book was in the basket but not anymore available… what if? Tips
  • 40. @aloyer 41 Scenario: A non authenticated visitor can add item to its basket Given I was not yet authenticated And I had no item in my basket And I was looking at the book « Living Documentation » When I add the book in my basket Then my basket should contain only the book « Living Documentation » Scenario: An authenticated visitor can add item to its basket Given I was already authenticated as « Emma » And I had no item in my basket And I was looking at the book « Living Documentation » When I add the book in my basket Then my basket should contain only the book « Living Documentation » Exercise: Scenario Analysis Tips
  • 41. How @aloyer 42 Why What/Intent What if…? use Should Business Language only Always assume you’re ignorant Provide a context for your use-case Rules for the conversation Tips Tips
  • 42. C QExamples L O A P L LLRequirements N 3 Amigos Workshop development / tests uat @aloyer 43 when
  • 45. Three Amigos Specifications Requirements Validate Examples Development Automation Living Documentation Examples Validation Non-Regression Right Software @aloyer 46