▲ | ehoh 8 months ago | ||||||||||||||||||||||
Sounds like the mocks are overused or used inappropriately in your experience (whether by a colleague or yourself). Mocks have their place. A prototypical example is at user-visible endpoints (eg: a mock client). | |||||||||||||||||||||||
▲ | bluGill 8 months ago | parent | next [-] | ||||||||||||||||||||||
I have found in my world it is easy to setup a test database (we use sqlite!) and the file system is fast enough (I have code to force using a different directory for files). I have been playing with starting a dbus server on a different port in my tests and then starting the real server to test against (with mixed results - I need a better way to know when dbus is running). I have had great success by writing a fake for one service that is painful - the fake tracks the information I really care about and so lets me query on things that matter not what the function signature was. I'm not arguing that mocks don't have their place. However I have found that by declaring I won't use them at all I overall come up with better solutions and thus better tests. | |||||||||||||||||||||||
▲ | player1234 8 months ago | parent | prev [-] | ||||||||||||||||||||||
Exactly! This one gets it, real communism has never been tried! On another note I do not think that it is tiresome at all, that any critique of any pattern/teqnique in SWE, always is meet with the "you are holding it wrong" rebutle. | |||||||||||||||||||||||
|