These are the slides of the workshop with @sventorben and @anthie44 at the Kandddinsky 2019 in Berlin. The workshop was about creating BDD tests based on a former Event Storming.
5. EventStorming
From Post-Itto Test- KanDDDinsky- Berlin 5
?
Collaborative
Modelling
Approach
No
substitute
for UML
Brings
project
stakeholders
together
Common
understanding
of domain
For technical
and
non-technical
stakeholders
Communication
FUN
@sventorben/ @anthie44
6. Fly Heights
• Big Picture
• explorecomplexityin anintricatedomain
• projectkick-off
• organisationretrospective
• Process Modeling
• designing processesandservices
• differentdisciplinesandperspectives
business,userexperience, softwaredevelopment
• Software / Feature Modeling
• fine-graineddiscussions
• softwarestructure
From Post-Itto Test- KanDDDinsky- Berlin 6@sventorben/ @anthie44
8. ModelingSummary
From Post-Itto Test- KanDDDinsky- Berlin 8
Command
Policy
Aggregate
External System
Domain
Event
Read Model
User
image: Freepik.com
@sventorben/ @anthie44
9. Events
From Post-Itto Test- KanDDDinsky- Berlin 9
Domain
Event
Verbin past
tense
Relevant for the
domain experts
Fine grained
Triggers system
reaction
@sventorben/ @anthie44
10. Command
From Post-Itto Test- KanDDDinsky- Berlin 10
Command
Imperative
Result of user decision
Action
@sventorben/ @anthie44
11. Aggregate
From Post-Itto Test- KanDDDinsky- Berlin 11
Aggregate
Components of the
system
Postpone Naming
Often likestate
machines
@sventorben/ @anthie44
12. ExternalSystem
From Post-Itto Test- KanDDDinsky- Berlin 12
External System
Black BoxOrganizations
Services Something wehave
no influence to
@sventorben/ @anthie44
13. Policy
From Post-Itto Test- KanDDDinsky- Berlin 13
Policy
Reactive Logic of the
system
Keyword „Whenever“
@sventorben/ @anthie44
14. Read Model
From Post-Itto Test- KanDDDinsky- Berlin 14
Read Model
Information
displayed to the
user
Information for
decision making
@sventorben/ @anthie44
15. Miscellaneous
From Post-Itto Test- KanDDDinsky- Berlin 15
User
Hot Spot
Definition
Shows
scepsis
Shows
incompleteness
Who is acting
For clarification of
concepts
@sventorben/ @anthie44
16. Choose a Taskfor your EventStorming
• Course Planning for
University
Choosing one Course
• Event System for Musicians
Book an event hall
From Post-It to Test - KanDDDinsky - Berlin 16@sventorben / @anthie44
19. Gherkin
From Post-Itto Test- KanDDDinsky- Berlin 19
Domainspecific
language
Photo designed by whatwolf / Freepik
Noneedtogo intodetailsof
implementation
Syntaxtranslatedinto37+
languages(Dialects)
Actsasdocumentationand
automatedtest
@sventorben/ @anthie44
20. Gherkin keywords
From Post-Itto Test- KanDDDinsky- Berlin 20
Feature: Book anEvent Hall
The musician wants tobook an Event Hall togive a
concert. He has tospecify some outline data like
the size ofthe hall, chairs,size ofthe stage
etc.
Given Dylan Beattie wants togive aconcert on 01.01.2020
Butthe chosen concert hall isalready assigned to him
When he books a concert hall
Then the concert hall is still assigned tohim
Andreminder is shown tohim
@sventorben/ @anthie44
21. Given somecontext
What is the context of the system?
What precondition must betrue before the action is tested?
Are there any otherconditions which must be fulfilled?
What events have occurred so far?
What data is in the system?
From Post-Itto Test- KanDDDinsky- Berlin 21@sventorben/ @anthie44
22. When someactioniscarriedout
What will betested?
What input data will betested when theaction occurs?
What business rule will betested?
From Post-Itto Test- KanDDDinsky- Berlin 22@sventorben/ @anthie44
23. Then observableconsequencesshouldobtain
In response to the action, what is the observable outcome?
What arethe expectedresults?
What is the post-condition (state) oroutput data/events observable by the user?
What actions aretriggered in an external system?
From Post-Itto Test- KanDDDinsky- Berlin 23@sventorben/ @anthie44
24. Example(1)
From Post-Itto Test- KanDDDinsky- Berlin 24
Givenan unreserved Concert Hall
When the musician reserves the Concert Hallfor 18.10.2019
Thenthe Concert Hallis reserved
And the Concert Hallname and adate are presented
Concert Hall
Reserve
Concert
Hall
Musician
Concert
Hall
reserved
Name
Date
@sventorben/ @anthie44
25. Example(2)
From Post-Itto Test- KanDDDinsky- Berlin 25
When(ever) the Deposit is payed
And the Date is confirmed
Then the hallwillbe assigned
And the name, musicianand date are presented
Concert Hall
Assign
Concert
Hall
Concert
Hall
assigned
Name
Musician
Date
Deposit
Policy
Deposit
payed
Date
confirmed
@sventorben/ @anthie44
26. Example(3)
From Post-Itto Test- KanDDDinsky- Berlin 26
Given a deposit is required for bookings greater than 10.000 €
And the booking feeis 10.001€
And the Concert Hall is requested
When(ever)the Date is confirmed
Thenthe Deposit will be requested
And the name,musician andDeposit Amount arepresented
Concert Hall
Assign
Concert
Hall
Concert
Hall
assigned
Name
Musician
Date
Deposit
Policy
< 10000€
>= 10000€
Date
confirmed
Request
Deposit
Deposit
Deposit
requested
Name
Musician
Amount
@sventorben/ @anthie44
27. Patternsim Event Storming
From Post-Itto Test- KanDDDinsky- Berlin 27
AggregateCommand EventPolicyEvent
External System
@sventorben/ @anthie44
28. Transfer patternsto Gherkin
From Post-Itto Test- KanDDDinsky- Berlin 28
Aggregate
Policy
Given:
(State based)
Stateofsystem
Givenanunassignedconcert hall
Concert Hall
Deposit
Policy
StateofSystem
Givenadepositis requiredfor
bookingsgreaterthan10.000€
@sventorben/ @anthie44
29. Transfer patternsto Gherkin
From Post-Itto Test- KanDDDinsky- Berlin 29
Eventsof system
Givenanunassignedconcert hall
Concert
Hall
assigned
Eventsof system
GiventheBookingFee is10.001€
AndConcertHall hasbeen requested
AndDatehasbeen confirmed
Given:
(Event based)
Concert
Hall
requested
Date
confirmed
Event
Event
Event
@sventorben/ @anthie44
30. Transfer patternsto Gherkin
From Post-Itto Test- KanDDDinsky- Berlin 30
Command
Seler
EventExternal System Policy
Reserve
Concert
Hall
Musician
Whenthemusicianreserves theConcert
Hall
Deposit
payed
Payment Provider Whenever
Whenthedeposithasbeen payed
When:
@sventorben/ @anthie44
31. Transfer patternsto Gherkin
From Post-Itto Test- KanDDDinsky- Berlin 31
Command External SystemEvent
Concert
Hall
assigned
Then:
Request
Deposit
Payment Provider
ThentheConcertHall will beassigned Thenthedepositwillberequested
@sventorben/ @anthie44
32. From Post-Itto Test- KanDDDinsky- Berlin 32
Givenan unreserved Concert Hall
When the musician reserves it to date 24.09.2019
Thenthe Concert Hallis reserved
And the Concert Hallname and adate are presented
Concert HallReserve
Seler
Concert
Hall
reserved
Name
Date
@sventorben/ @anthie44
33. From Post-Itto Test- KanDDDinsky- Berlin 33
TestTestTestTestTest
@sventorben/ @anthie44
34. Q&A(now or later during coffee break … we are around)
From Post-Itto Test- KanDDDinsky- Berlin 34@sventorben/ @anthie44
35. References
• Eric Evans: Domain-Driven Design: Tackling Complexity in the Heartof Software, Addison Wesley, 2003
• Event Storming Web-Page:https://www.eventstorming.com/resources/
• Alberto Brandolini: Introducing EventStorming - An act of Deliberate Collective Learning, Leanpub (not completed yet)
• Gherkin Syntax: https://cucumber.io/docs/gherkin/
• Kamil Nicieja: Writing Great Specifications, 2017, Manning
• SebRose, GáspárNagy: The BDD Books: Discovery
• Gojko Adzic: Specification by Example, 2011, Manning
From Post-Itto Test- KanDDDinsky- Berlin 35@sventorben/ @anthie44