4 ms·
I kind of lost it at this point: > Kent C. Dodds claims that integration tests provide the best balance of cost, speed and confidence. I subscribe to that clai
by lucisferre 8y ago
I kind of lost it at this point:
> Kent C. Dodds claims that integration tests provide the best balance of cost, speed and confidence. I subscribe to that claim. We don’t have empirical evidence showing that this is actually true
And
> There is the claim that making your code unit-testable will improve its quality. Many arguments and some empirical evidence in favor of that claim exist
Why rely on evidence when conjecture an opinion are so much easier?
So here's my own limited evidence to toss on the other pile. Our team has started to unit test everything, 100% coverage. We don't take this approach to testing lightly, it is a holistic approach that includes the code itself, focusing on architectures that enable testing and testability. Doing so has vastly improved code quality in measurable ways.
Code reviews are faster and easier as a starting point. It is easier for another person to understand quickly what each component does and what it is expected to do. Code is composed using small autonomous functional components that are uncompleted and easy to reason about and test. These make debugging easier because they can be isolated to simple components and tests. Bug fixes are faster to implement and test since the test infrastructure is already in place and does not need to be remediated in later.
Yes, we do also write integration tests. They tests the end-to-end scenarios we are designing the system to support. But unit testing is still the primary approach to how we design, while integration provides support by verifying complete scenarios.
However our approach admittedly doesn't have "Lean" in the name, so that's one downside I guess.
- newgame 8y agoSoftware quality can be measured in different ways. Software quality is not the only dimension to care about when developing products.
- lucisferre 8y agoSo what dimensions do you propose to care about? Do the dimensions I mention not matter at all? If they do matter then I think there is still a point here. You are engaging in a strawman. I don't claim anywhere that these are the only dimensions to care about, I simply claim that these are some things we've noted that testing leads to improvements. Ultimately though my primary claim is simply that I see less value in opinions vs evidence.
- newgame 8y agoFair enough. Though I'd like to think that I presented clear arguments even though I didn't present _empirical_ evidence for my arguments. I presented ideas and logical steps how to arrive at them. Which, to me, makes it more than "just an opinion". Sure, you may disagree with the ideas and or the steps–it's not a mathematical proof, it's much softer. Sidenote: Nonetheless, I provided two links to empirical research finding counterintuitive results from TDD and from unit tests. Clarification: I am not engaging in a strawman. I didn't claim that _you_ said these are the only dimensions. I tried to express, generally, that software quality is one of several important dimensions. I could have phrased it in a clearer way.
- lucisferre 8y ago> Software quality can be measured in different ways. Software quality is not the only dimension to care about when developing products This statement is an implied counter argument. If not then what is it? If so, then I suggest it is a strawman as I never argued against that. > I'd like to think that I presented clear arguments If you are referring to the original article I was not aware you were the author, so my response above simple responded to your statement in context and not the article as a whole. I'll do so below. I don't argue that the article presents it's arguments clearly, though I don't necessarily agree with them. Actually, my main issue is with the rhetorical style it is presents it in. It tries to hard to sell less testing as a solution to testing pain, rather than exposing it as a possible idea to be discussed. Using mostly a combination of appeals to authority and association with the term "lean" as rhetorical devices. This, to me, smells like the last generation "Agile" snake oil. On separate level I do disagree with presenting logical reasoning as a counter argument to empirical evidence. Logical reasoning may be a compelling reason to seek empirical evidence through trial and experimentation, but reasoning alone can't invalidate evidence. With that said, I do believe some other commenters here mentioned that there is evidence on both sides of this debate, so I won't say your idea's are not worth exploring, though they definitely contradict my own experiences with testing.
- deleted 8y ago[deleted]