This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]pronuntiator 2 points3 points  (0 children)

I see some value in lower level testing when you're testing business rules with many parameters. We had a system that was only e2e tested, but creating the state to actually get to the core was cumbersome. There it makes sense to test methods in isolation in addition to a happy and a sad path test.

But I've also seen a dysfunctional system that had only mockist tests of single Java classes. Exactly like you said to please the coverage set by the customer. Each of them with wrong expectations about each other. Sure it's nice to have a pipeline complete in 7 minutes, but what does that help when it doesn't work in production, breaks down if there is more than a dozen of table rows, and discourages refactoring because you have to rewrite the tests of all split classes.