[erlang-questions] Unidirectional architectures in Erlang
Fred Hebert
mononcqc@REDACTED
Sat Sep 1 04:15:08 CEST 2018
On 08/31, Jachym Holecek wrote:
># Fred Hebert 2018-08-30:
>> This lets you test each section of the chain in isolation; then if all
>> sections are well-behaved, you can infer that the whole chain should behave
>> well.
>
>That sounds like a very dangerous conclusion to be making, personally.
>
>It's not unheard of that thousands of unit-tests "pass" and everything is
>"ready" and then it all falls like a house of cards with a single naive
>end-to-end flow. ;-)
>
Yes, this is why the original quote also strongly suggested having at
least one end-to-end pipeline on top of it. It's just that you may have
fewer details to worry about in the end-to-end pipeline when what you
have to focus on is "is it all plumbed together right" rather than "are
all elements of the whole chain correct and also plumbed together
right".
This is about scoping your tests, and defining which behaviours and
properties of your code you want to validate. You'd want the unit tests
to validate the minutiae of each step, but the integration suite to
check that they're wired up correctly, for example.
I've worked and seen lots of integration and system tests that, through
obtuse combination of inputs, exercised very narrow behaviour of
deeply-entrenched bits of code. Those tests are generally slow to set
up, very fragile, and rarely deterministic.
More information about the erlang-questions
mailing list