Why do I Test?
Most of you who would read this would have done some level of testing in their programming career. Many of you would appreciate the fact that unit testing exists in the world.
Analogy that works for me is that in real life, I test all the time. I test so much that it has become a habit so much so, that I now do not even realize that I am testing. If I think about it, I can site many examples. The reason I test so often is because I want to be sure that things will work when I need them to.
When I became a programmer, I found myself doing that same just out of habit of testing everything. Since I started to code, I have come across may programmers who have reasons not to test and they resist testing al their life. Once they find themselves in a the arena of no testing, they enjoy and as per them are most productive. As for me, there have been times, when I have not tested myself, and I have been productive as well, but I have always found that the applications that I design/code with writing tests end up being prototypes.
I see many benefits of testing, and thats the reason when I start a project, I make sure that the first thing that is done is to setup an integrated unit testing tool for me to write my tests. In other words, without unit tests, I do not trust my own code and I would not even go into changing it – I can never know after a few changes if I broke something. Unit tests act as an umbrella that saves you from a downpour for defects in the application.
Passing my code along to a new developer has been a challenge. Ever tried giving a new programmer a code walk through. I tried test walk through and it has been a wonderful experience. They understood the code once and were able to start coding faster. I like to call my tests as API documentation for my code.
I have been unit testing in projects for last 3.5 years now and always I have found in a later stage how valuable those tests were. Coming to Flex, I started to find similar options and Flex Cover was the answer. Simple to get started and now very soon I would have my testing suite for Flex as well.
Eager to hear what your experience have been.