Rectangular stickies get tests?

23 views
Skip to first unread message

Ryan Marsh

unread,
Jan 30, 2021, 1:16:53 PM1/30/21
to EventStorming
Hi Alberto, 

During the Event Storming Masterclass in Milan, Autumn of ’19, I noted you said something along the lines of “rectangular stickies get tests”. The rectangular stickies being External Systems, and Policies. I believe this was in reference to using BDD to test them. I’ve been a Cucumber trainer for many years so this stuck in my brain although I’m sure I’m getting it all wrong. Could you please clarify testing and the rectangle comment for me?

Kind regards, 
Ryan Marsh

Ryan Marsh

unread,
Jan 30, 2021, 1:21:46 PM1/30/21
to EventStorming
A small edit to my question. I forgot that Aggregates are also rectangular stickies. So Aggregates, Policies, and External Systems are all testable, presumptively with BDD? And what of the square ones?

abaddon

unread,
Jan 31, 2021, 5:34:35 AM1/31/21
to Ryan Marsh, EventStorming
Hi Ryan,
I’m not Alberto, but I can try to response to your question.

The most important tests are related the yellow (?) rectangular sticker, the aggregate.
The aggregate has to contain your business logic and it has to be tested very well. 
BDD is a good approach and pretty easy if you define, during the design workshop, for each command the PRE, POST conditions and invariants. At the end you are writing the BDD test on paper and the implementation part is pretty easy.

The other rectangular stickers are:
- Purple,  the policy. The policy is a rule, a trigger. Here there isn’t business logic to test, you could test the process eventually. So at this level You are testing the interaction between aggregates. Something happened then a command is triggered.

- Pink: the external service: I considered it like a black box. It’s something outside my context. I know only that it do something and nothing more. No test here.

Excluding the red and yellow square stickers, used to highlight questions and notes, I remember only the green one.
The green one is the read model. 


Best,

Stefano 

--
You received this message because you are subscribed to the Google Groups "EventStorming" group.
To unsubscribe from this group and stop receiving emails from it, send an email to eventstormin...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/eventstorming/670294b9-db2d-4f66-8778-9c853d129b1dn%40googlegroups.com.

Alberto Brandolini

unread,
Feb 2, 2021, 6:10:38 AM2/2/21
to abaddon, Ryan Marsh, EventStorming
Hi all, 

the original intention for shape mapping was to assign a rectangular shape for places that had some internal logic, and a smaller square one to 'messages'.
It helps the visual cadence mitigating color blindness issues.

I do BDD testing in an end-to-end fashion, collecting the scenarios out of narratives upon the software design phase. Usually, the first scenario is rather dumb, then I add a scenario for one of last year's corner cases. I tend to say a few bad words when configuring asynchronous testing, but then I get used to it.

I do test aggregates and policies on a component level, depending on what the infrastructure provides.
Aggregate testing is easy: it's basically a state machine. Once it's tested can be sealed.
Policy -> Saga testing can be trickier in order to cover corner cases, which will emerge later on.
I do test projections too. Not everything is trivial in there.

Commands don't usually require much testing initially, but evolving scenarios and multiple sources can require more robustness in this area in the later stages of evolution.

Alberto



--
Reply all
Reply to author
Forward
0 new messages