Site icon SmartQA

on Coverage

(In this SmartBits, Girish Elchuri outlines ” on Coverage “. The video is at the end of this blog)

During development,100% unit testing is needed, anything less is useless. Look at it this way; when you are crossing the chasm, if you jump even 99%, you still die. So it has to be 100%. The way I approach this is, every single line of code that I execute, I execute it as part of the code itself or execute it separately to make sure that the function is behaving the way that it is expected to behave for the parameters being passed.Most of the times the help text provided by the man-pages for the functions may not be 100% complete.From that perspective firstly you have to test the code by yourself. Secondly, certain functions even after being tested have to be again tested as a  part of the product and for that I do write a lot of scaffolding code. It is a must. This is not something that I preach, but I practise as well. At this stage, a lot of development of my product is done by myself and I do practise 100% of unit testing and in my opinion, there is no shortcut.