title: Why using Integration tests instead of unit tests is a bad idea?
body: <p>Let me start from definition:</p>
  
  <p><strong>Unit Test</strong> is a software verification and validation method in which a programmer tests if individual units of source code are fit for use</p>
  
  <p><strong>Integration testing</strong> is the activity of software testing in which individual software modules are combined and tested as a group.</p>
  
  <p>Although they serve different purposes very often these terms are mixed up. Developers refer to automated integration tests as unit tests. Also some argue which one is better which seems to me as a wrong question at all.</p>
  
  <p>I would like to ask development community to share their opinions on <em>why automated integration tests cannot replace classic unit tests</em>.</p>
  
  <p>Here are my own observations:</p>
  
  <ol>
  <li>Integration tests can not be used with TDD approach</li>
  <li>Integration tests are slow and can not be executed very often</li>
  <li>In most cases integration tests do not indicate the source of the problem</li>
  <li>it's more difficult to create test environment with integration tests</li>
  <li>it's more difficult to ensure high coverage (e.g. simulating special cases, unexpected failures etc)</li>
  <li>Integration tests can not be used with <a href="http://benpryor.com/blog/2007/01/16/state-based-vs-interaction-based-unit-testing/" rel="noreferrer">Interaction based testing</a></li>
  <li><a href="https://stackoverflow.com/questions/1788436/why-using-integration-tests-instead-of-unit-tests-is-a-bad-idea/1788461#1788461">Integration tests move moment of discovering defect further</a> (from <a href="https://stackoverflow.com/users/14860/paxdiablo">paxdiablo</a>)</li>
  </ol>
  
  <p>EDIT: Just to clarify once again: the question is not about whether to use integration or unit testing and not about which one is more useful. Basically I want to collect arguments to the development teams which write ONLY integration tests and consider them as unit tests.
  Any test which involve components from different layers is considered as integration test. This is to compare to unit test where isolation is the main goal.</p>
  
  <p>Thank you,
  Andrey</p>