The myth of integration tests

The question of what exactly is a unit test, is one that keeps on plaguing us as a community. I have heard many developers say “oh, no need to test that - its an integration test”.

Well - what is a unit test? and what is an integration test? Guess what: One programmer’s unit test is another’s integration test.

I have talked before about Microsoft getting it right when they called their developer testing tool msTest and not msUnit, and I am going to continue that line of thought. Most developers call any tests that is too complex to automate an Integration test. e.g. GUI or Database. The truth is once the right tools are in place and these ‘impossible to test’ will be possible, and once they are possible - they will be called unit-tests.

So all the tests that we can automate are unit-tests and those that are too complex to automate are integration tests. The complexity can come from brittleness of the tests - so when developing database applications - relying on the actual database will make our test brittle - i.e. Integration test.

We will see in time that with the right tools, we will have more areas that will be called unit tests, because testing them will become easy.

25 November 2008 | TDD, Agile | Comments | Print This Post

Leave a Reply

  1.  
  2.  
  3.  
Search Development and Integrity Management by Eli Lopian

Navigation

Recent Posts

Categories

Archives

Managment