07 September 2010

Just unit test?

I just realized something today. Something deep, and profound and totally astonishing . Well, for me anyway. I realized that maybe, just maybe doing unit tests on project is enough. On most projects I have an influence on I strive to have functional and integration tests besides regular unit test. I just feel is best to cover each layer of the application in one fell swoop with functional tests or acceptance test (it depends really how you do them) with a good coverage of unit test for each object separately.
Today I've done a lot of unit tests. I worked late, and I've done a lot of coding. For class I've done I wrote unit test. And with those tests I covered a lot of functionality of the application. When I reached the user interface there wasn't much to test, everything worked fine since I got the majority of the defects with unit tests on the lower layers.
It seems strange to me since we do tests in complete isolation from each other, so no outside dependencies between tests are allowed. Everything is mocked. But with a real fine granularity of objects for a specific functionality it is possible in my opinion to just have unit tests and cover the majority of the expected functionality of the application.

No comments:

Post a Comment