
Integrated Tests Are A Scam - phiggy
http://blog.thecodewhisperer.com/2010/10/16/integrated-tests-are-a-scam/
======
jmcgough
I don't think that integration testing is _sufficient_ (you will never catch
every bug by writing tests - programming is too complex to expect any one
coder to be perfect all the time). I'd also argue that writing _too many_
integration tests can become a burden - having to change hundreds of tests
when a site/app changes is tedious and time-consuming.

However, that doesn't mean that integration testing is _useless_. Writing a
few tests to verify that mission-critical functions (like website
registration) are working can save you when something goes wrong, and it's
more efficient than doing manual regression testing every release.

Lastly, I really wish the author would give suggestions for what he considers
to be a better approach to testing, beyond "integration testing sucks and is a
scam".

~~~
phiggy
_Lastly, I really wish the author would give suggestions for what he considers
to be a better approach to testing, beyond "integration testing sucks and is a
scam"._

He has more articles on better approaches than integration tests, but I
haven't read them yet so I can't say if they answer your questions
sufficiently:
[http://blog.thecodewhisperer.com/blog/categories/integrated-...](http://blog.thecodewhisperer.com/blog/categories/integrated-
tests-are-a-scam)

------
pmiller2
I'm a bit confused what he's trying to say here. He seems to be arguing that
full branch coverage is needed for _thorough_ testing, but then argues
something to the effect of "it's too hard."

So, what are we supposed to do? Not test? Not test "thoroughly"? Write 1084x
as much test code as production code[1]? He provides no alternative.

\---

[1] [http://www.sqlite.org/testing.html](http://www.sqlite.org/testing.html)

~~~
phiggy
I think the point is something like "don't unit test the system as a whole".
Black box testing is great and most definitely should be used, but should be
kept very high level and unit tests should be kept very small and granular.

The author has several other articles on the subject that I have not read yet,
so I'm not sure if I've got a full understanding of his point yet:
[http://blog.thecodewhisperer.com/blog/categories/integrated-...](http://blog.thecodewhisperer.com/blog/categories/integrated-
tests-are-a-scam)

------
aaron695
Randomised testing?? 1000000..... tests take a small amount of time to write.

Not saying thought out tests are worst, just if you really want to go down the
road of testing amazing amounts of options there are options, personally rare
events who cares, but automation can find things you didn't think of if you
can't write quality tests.

------
muhuk
Defect free code is a scam.

The author is focusing catching errors with tests too much, he seems to miss
the point that the difficulty of writing adequate unit tests is a symptom of
bad design.

