Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
If tests get obese, that is a sure sign for the tested thing having too much complexity.
And some things are better tested without mockup classes on a test system running the entire beast. -
@Oktokolo Distributed stuff with lost of async calls, we have to mock to test most cases reliably.
-
@RemusWasTaken
Distributed systems are best tested as such.
That may or may not need lots of virtual machines or containers replicating the real thing as much as possible... -
@Oktokolo We have lots of those too.
But it's really hard to reliably test (failure) cases where things have to happen in a specific order for an edge case to appear.
So you ned to be able to control all of the timings which you cannot do with the real thing.
Related Rants
TFW the mock class has way more code than the real one.
Testing big infrastructures can be a pain...
Or maybe my team is just not so good at it.
My time spent:
Adding new feature to the real class 15%
Extending the mock with the same feature 55%
Writing tests 30%
rant
testing
mock
python3