3 ms·
I agree most of the time I am just fixing silly issues like this mock is now broken because I added a method or a field or the like - or some beefy test setup c
by externalreality 8y ago
I agree most of the time I am just fixing silly issues like this mock is now broken because I added a method or a field or the like - or some beefy test setup code is now broken because of some otherwise innocuous change. I do believe high-level functional/acceptance tests are important however, that is, tests that check whether the various programs that make up the system actually do what they are meant to do. For example a CLI test for a program that interfaces with the user from the CLI. If a program is writing to storage, check to see if it actually writing to the storage properly. All the little mocks and stubs and so forth seem to be to form a false sense of security.
Those who are in favor of unit tests have one big weapon on their side of the argument and that is simply the word "test" "how can a test be bad?, right?"